mirror of
https://github.com/samba-team/samba.git
synced 2025-01-13 13:18:06 +03:00
JHT ===> William Yost patches integrated to fix leading path on 8.3
filename problem.
Problem conditions:
case sensitive = no
default case = lower
mangle case = yes
preserve case = yes
short preserve case = yes
Problem: Win95 still writes upper case file names.
Patches supplied have been incorporated into mangle.c and server.c
but needs YOSTW to be defined for it to take effect.
Action:
=======
If we are happy with the patch, delete old code in mangle.c, then
remove all YOSTW #ifdefs.
(This used to be commit 84fc674c89
)
This commit is contained in:
parent
e3aff2459e
commit
8839603f03
@ -92,6 +92,7 @@ BOOL is_8_3(char *fname)
|
||||
DEBUG(5,("checking %s for 8.3\n",fname));
|
||||
|
||||
if (case_mangle)
|
||||
#ifndef YOSTW
|
||||
switch (case_default)
|
||||
{
|
||||
case CASE_LOWER:
|
||||
@ -101,6 +102,10 @@ BOOL is_8_3(char *fname)
|
||||
if (strhaslower(fname)) return(False);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#ifdef YOSTW
|
||||
if (strhasupper(fname) && strhaslower(fname)) return(False);
|
||||
#endif
|
||||
|
||||
/* can't be longer than 12 chars */
|
||||
if (len == 0 || len > 12)
|
||||
|
@ -389,6 +389,9 @@ BOOL unix_convert(char *name,int cnum,pstring saved_last_component)
|
||||
struct stat st;
|
||||
char *start, *end;
|
||||
pstring dirpath;
|
||||
#ifdef YOSTW
|
||||
char szName[132], *p;
|
||||
#endif
|
||||
|
||||
*dirpath = 0;
|
||||
if(saved_last_component)
|
||||
@ -398,6 +401,23 @@ BOOL unix_convert(char *name,int cnum,pstring saved_last_component)
|
||||
unix_format(name);
|
||||
unix_clean_name(name);
|
||||
|
||||
#ifdef YOSTW
|
||||
/* Remove leading path specifications to check for 8_3 name */
|
||||
if ( strncmp( name, "./",2) == 0 ) {
|
||||
strcpy( szName, name+2 );
|
||||
}
|
||||
else {
|
||||
strcpy( szName, name );
|
||||
}
|
||||
p = strrchr( szName, '/' );
|
||||
if ( p != NULL ) {
|
||||
p++;
|
||||
}
|
||||
else {
|
||||
p = szName;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!case_sensitive &&
|
||||
(!case_preserve || (is_8_3(name) && !short_case_preserve)))
|
||||
strnorm(name);
|
||||
|
Loading…
Reference in New Issue
Block a user