Commit 36543191 authored by Stewart Brodie's avatar Stewart Brodie
Browse files

More tolerance has been added of files found on the remote server which have unexpected extensions.

Detail:
  LanManFS does not like it if you create (independently, using a PC or
    otherwise) files with names like "myfile,fff" which you intend to
    be displayed as files with type &FFF (ie. Text) on a RISC OS machine.
    If you tried to access the file for reading it, such as loading it
    into an editor, that worked due to the name matching resolution.
    However, any attempt to update the file caused LanManFS to attempt
    to write the file without the extension and not notice that a file
    with a ,fff extension already existed (Text files are special cased
    in the current implementation of name translation - see LanManFS
    Functional Specification for details and rationale).  Attempts to
    save typically succeed (giving you two files: myfile and myfile,fff)
    but generate "Operation not permitted" or such like.  This stemmed
    from the attempt being made by LanManFS to rename a file to the same
    name.  SMB_Rename now traps that and tells its caller that the rename
    succeeded.  The Xlate.c code now indicates correctly that the filename
    extension has been altered when a ,fff extension has to be chopped off.
Admin:
  Tested briefly on desktop build against art-work's SAMBA server.
  Bug reported by TopCat engineers.

Version 2.10. Tagged as 'LanManFS-2_10'
parent c6e5fb1a
/* (2.09)
/* (2.10)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 2.09
#define Module_MajorVersion_CMHG 2.10
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 29 Nov 1999
#define Module_Date_CMHG 21 Jan 2000
#define Module_MajorVersion "2.09"
#define Module_Version 209
#define Module_MajorVersion "2.10"
#define Module_Version 210
#define Module_MinorVersion ""
#define Module_Date "29 Nov 1999"
#define Module_Date "21 Jan 2000"
#define Module_FullVersion "2.09"
#define Module_FullVersion "2.10"
......@@ -1785,6 +1785,10 @@ err_t SMB_Rename ( char *oldpath, char *newpath )
if ( oldpath[0] != newpath[0] ) /* Different drives! */
return EBADRENAME;
debug2("SMB_Rename: %s %s\n", oldpath+1, newpath+1);
if (strcmp(oldpath+1, newpath+1) == 0)
return OK;
hS = GetShare (oldpath, &res);
if ( hS == NULL )
return res;
......
......@@ -1293,8 +1293,9 @@ int Xlt_AddROType ( char *leafname, uint loadaddr )
}
if (Xlt_SplitLeafnameX2 ( leafname, &RA, &terminator) == OK) {
int extn_add_or_remove = (*terminator != *typebuf);
strcpy(terminator, typebuf);
return (RA.loadaddr >> 8) != (loadaddr >> 8);
return (RA.loadaddr >> 8) != (loadaddr >> 8) || (extn_add_or_remove);
}
else {
strcat(leafname, typebuf);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment