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
"Duane" == Duane Clark dclark@akamail.com writes:
Duane> I have a question about the handling of filename case when trying Duane> to find an existing file. When files are on a win filesystem, the Duane> case is ignored, by the setting of flags by DRIVE_GetFlags(). As Duane> expected.
... Duane> However, if the file is not an 8.3 filename, the call to Duane> DOSFS_ToDosFCBFormat() fails, and no case insensitive test is Duane> made.
What Filesystem have you set for the drive? It should be "vfat" is you want a case insensitive search...
Bye
Uwe Bonnes wrote:
"Duane" == Duane Clark dclark@akamail.com writes:
Duane> I have a question about the handling of filename case when trying Duane> to find an existing file. When files are on a win filesystem, the Duane> case is ignored, by the setting of flags by DRIVE_GetFlags(). As Duane> expected.
... Duane> However, if the file is not an 8.3 filename, the call to Duane> DOSFS_ToDosFCBFormat() fails, and no case insensitive test is Duane> made.
What Filesystem have you set for the drive? It should be "vfat" is you want a case insensitive search...
Thanks. That was indeed it, though the documentation on winehq says "win95", so I used that instead of vfat.
"Duane" == Duane Clark dclark@leewardfpga.com writes:
Duane> Thanks. That was indeed it, though the documentation on winehq Duane> says "win95", so I used that instead of vfat.
VFAT and WIN95 should do the same. Could you investigate a little more?
Bye
Uwe Bonnes wrote:
"Duane" == Duane Clark dclark@leewardfpga.com writes:
Duane> Thanks. That was indeed it, though the documentation on winehq Duane> says "win95", so I used that instead of vfat.
VFAT and WIN95 should do the same. Could you investigate a little more?
Sorry, I think the way I worded that confused everyone. I previously had "unix" as the disk "Filesystem" (I guess I thought that was required for ext filesystems). After reading your message, I took a look at the docs, and they said "win95" but made no mention of "vfat". So I put win95 in the config file, and that fixed things. Now I also tried vfat, and that also works fine.
Of course, that still leaves "unix" filesystems being case insensitive to 8.3 filenames but case sensitive to long filenames...
Duane