Letter case not preserved
ben_kelley at wdr.com
Sun Nov 29 21:00:04 GMT 1998
This is not a bug. The default action (so I've found out) is to force "short"
names (ones that fit into 8.3) to the default case. If you set "short preserve
case = yes" then short file name are not forced to the default case.
With both "preserve case = yes" and "short preserve case = yes" then all files
created in mixed-case aware apps keep their correct case on the Unix side - even
for "short" filenames. They don't get forced to their default case with this
- Ben Kelley.
Fred Viles wrote:
> On 22 Sep 98, at 11:28, Ben Kelley wrote about
> "Re: Letter case not preserved":
> | > > All files transferred to my Samba server end up with lower case on the
> | > > Unix box. Case is not preserved from NT to Unix. For example, if I
> | > > copy C:\Temp\MyFile to a directory on the Samba server, it
> | > > ends up there
> | > > as myfile.
> | > Try preserve case = yes. The default case for Samba is lower case (I
> | > think) but that is configurable too (default case = upper)
> | I've come across this problem also. I have:
> | mangle case = no
> | preserve case = yes
> | set, but all files seem to get created in lower case. Am I missing
> | something?
> "preserve case" applies to "long" names. There is a seperate option,
> "short preserve case", which is documented as controlling whether
> "short" names are converted to the default case or left alone.
> According to the docs, "short" names are all uppercase and within the
> 8.3 DOS convention. Since DOS and Windows 16-bit apps will always
> pass all filenames as uppercase, it can make a lot of sense to have
> "short preserve case = off" if you create files with DOS apps and
> then use them from Unix. Otherwise (for example) all the source
> files you create with your DOS editor will be named SOURCE.C instead
> of source.c.
> However, there appears to be a bug in the implementation of "short
> preserve case" (at least in 1.9.18p10). Contrary to the docs, *all*
> 8.3 names are forced to the default case, even mixed-case names.
> This is not what is wanted, IMO.
> The following patch to server.c fixed this problem for me:
> --- orig/server.c Wed Aug 19 16:41:53 1998
> +++ server.c Fri Nov 27 22:36:18 1998
> @@ -551,8 +551,13 @@
> pstrcpy(saved_last_component, name);
> - if (!case_sensitive &&
> - (!case_preserve || (is_8_3(name, False) && !short_case_preserve)))
> + /*
> + ** force name to default case if desired. !strhaslower() was added to
> + ** match docs - 8.3 names are not forced to default unless they are all
> + ** uppercase.
> + */
> + if (!case_sensitive && (!case_preserve ||
> + (!short_case_preserve && is_8_3(name, False) && !strhaslower(name))))
> /* check if it's a printer file */
Ben Kelley - ben_kelley at wdr.com
Phone +61 2 9324 2382 Fax +61 2 9324 2400
Internet - http://i.am/ben_kelley
WDR Intranet - http://syddevwww/People/Ben_Kelley.html
Warburg Dillon Read, Level 24, 1 Farrer Place, Sydney, 2000 Australia
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 397 bytes
Desc: Card for Ben Kelley
Url : http://lists.samba.org/archive/samba/attachments/19981130/4b71f4d7/ben_kelley.vcf
More information about the samba