Tony Lambregts wrote:
What about reversing the order: first try the DOS path, if that fails, try the Unix one...
It is not possible to easily reverse the order in wine searches DOSFS_GetPathDrive. If it sees a "/" then it tries to use the path as a (absolute) unix one otherwise it just returns the current drive. Changing this behavior is not simple and however annoying the message is it is correct.
The message is correct, but Wine's behavior is not. I'm pretty sure you understand the issue, but for anyone still wondering: The problem is strictly theoretical at this point, but we should be aware of it in case somebody runs into it in the future. Here's the scenario: * user installs MinGW or some other app that's been ported to Win32 but uses Unix-style path separators for win32 directories * a path used by the program happens to exist both in the Windows filespace on drive C: (presumably this would be something installed by the app) and in the Unix filespace. For instance, the path /etc/blort/config might be a configuration file for a library used both on Linux and installed independently onto drive C: by the application. * The app tries to open the file on drive C:, and gets the file in Linux instead. Bang! The program crashes, or gives bad results.
... In order to change this behavior we would have to make changes to GetShortPathNameW so that it tries the path with the current drive first and then calls this (modified) function. After looking at the code for the last couple of hours I'm sure it could be done but I don't know if it is worth it.
Thanks for looking at it.
At present I think that it would be better to change the message
{
if ((drive = DRIVE_FindDriveRootW( name )) == -1) {
MESSAGE("Warning: %s not accessible from a configured DOS
drive\n", debugstr_w(*name) );
WARN("failed to find %s as an absolute unix path mapped to
configured DOS drive \n",
debugstr_w(*name) );
WARN("assuming it was a really a DOS name") /* Assume it really was a DOS name */ drive = DRIVE_GetCurrentDrive(); }
Or something like that.
Or something like that, yeah. We want to display a hint that there might be a misinterpretation of a DOS path as a Unix path. - Dan