Filename case handling
Duane Clark
dclark at akamail.com
Sun Dec 16 15:31:37 CST 2001
I have a question about the handling of filename case when trying to
find an existing file. When files are on a win filesystem, the case is
ignored, by the setting of flags by DRIVE_GetFlags(). As expected.
When on a ext filesystem, that call sets the DRIVE_CASE_SENSITIVE flag,
which is ok. But then the flag is used in the call to
DOSFS_FindUnixName() (from DOSFS_GetFullName()), and I guess the
fundamental question I have is under what circumstances wine would want
to do a case sensitive search.
One of my apps (Xilinx ngdbuild) always supplies upper case names when
searching for a file, but the files always have lower case names (they
were created by another Xilinx app). When searching for this file in
DOSFS_FindUnixName() on an ext filesystem, the first test always fails,
because we do a case sensitive test:
if (!ignore_case)
{
if (!strncmp( long_name, name, len )) break;
}
However, and here is the other part I am questioning, if the file is an
8.3 filename, an alternate dos filename is created by
DOSFS_ToDosFCBFormat(), and then a second test is performed here:
if (!strcmp( dos_name, short_name )) break;
This call passes and the file is found.
However, if the file is not an 8.3 filename, the call to
DOSFS_ToDosFCBFormat() fails, and no case insensitive test is made.
So it seems to me that either a case sensitive search should be made in
both cases, or in neither case. And of course I think that it should be
both cases (since this fixes my app) :-)
Duane
More information about the wine-devel
mailing list