Any word on why this patch wasn't applied? There's a test marked todo_wine
by Stefan Leichter that demonstrates this behaviour. And here's the relevant
part of a relay log:

 0009:Call kernel32.QueryDosDeviceA(7fb0fe68 "a:",7fb0f8c8,00000400) 
ret=0100503a
 0009:Ret  kernel32.QueryDosDeviceA() retval=00000000 ret=0100503a
 0009:Call kernel32.QueryDosDeviceA(7fb0fe68 "b:",7fb0f8c8,00000400) 
ret=0100503a
 0009:Ret  kernel32.QueryDosDeviceA() retval=00000000 ret=0100503a
 0009:Call kernel32.QueryDosDeviceA(7fb0fe68 "c:",7fb0f8c8,00000400) 
ret=0100503a
 0009:Ret  kernel32.QueryDosDeviceA() retval=0000000c ret=0100503a
 0009:Call ntdll._strlwr(7fb0f8c8 "..\\drive_c") ret=01005053
 0009:Ret  ntdll._strlwr() retval=7fb0f8c8 ret=01005053
 0009:Call ntdll.strstr(7fb0f8c8 "..\\drive_c",01002638 "harddisk") ret=01005069
 0009:Ret  ntdll.strstr() retval=00000000 ret=01005069
 0009:Call ntdll.strstr(7fb0f8c8 "..\\drive_c",01002630 "ramdisk") ret=0100507d
 0009:Ret  ntdll.strstr() retval=00000000 ret=0100507d
 0009:Call kernel32.QueryDosDeviceA(7fb0fe68 "d:",7fb0f8c8,00000400) 
ret=0100503a
 ...

I know this affects the IE7 and MSI 3.1 installer, but probably more.

------------------

I've seen installers from Microsoft call QueryDosDevice on the whole
alphabet and search any returned object name for the substrings "harddisk"
and "ramdisk". On Wine they normally won't find any and quit with the
following error:

  "Unable to find a volume for file extraction"

QueryDosDevice on Wine returns the filename pointed to by the drive link
beneath the dosdevices directory. In a default Wine installation this
is ../drive_c. So a simple fix for this problem is to use the a different
name for that directory, for example the name used for the first harddisk
in the NT object namespace: harddiskvolume1.

 -Hans

Changelog
  Use directory harddiskvolume1 for mapping drive C instead of drive_c.
12bdc95f62dc7adedca4b9f48262c4611a287b1b
diff --git a/programs/winecfg/drivedetect.c b/programs/winecfg/drivedetect.c
index 7c3cf3d..2b55ade 100644
--- a/programs/winecfg/drivedetect.c
+++ b/programs/winecfg/drivedetect.c
@@ -172,7 +172,7 @@ static void report_error(int code)
             if (gui_mode)
                 MessageBox(NULL, "No virtual drive C mapped\n\nTry running wineprefixcreate", "", MB_OK | MB_ICONEXCLAMATION);
             else
-                fprintf(stderr, "winecfg: no drive_c directory\n");
+                fprintf(stderr, "winecfg: no drive C mapped\n");
 
         case NO_HOME:
             if (gui_mode)
@@ -250,14 +250,14 @@ static void ensure_drive_c_is_mapped(voi
     
     if (drives[2].in_use) return;
 
-    len = snprintf(NULL, 0, "%s/../drive_c", configdir);
+    len = snprintf(NULL, 0, "%s/../harddiskvolume1", configdir);
     drive_c_dir = HeapAlloc(GetProcessHeap(), 0, len);
-    snprintf(drive_c_dir, len, "%s/../drive_c", configdir);
+    snprintf(drive_c_dir, len, "%s/../harddiskvolume1", configdir);
     HeapFree(GetProcessHeap(), 0, drive_c_dir);
 
     if (stat(drive_c_dir, &buf) == 0)
     {
-        add_drive('C', "../drive_c", "Virtual Windows Drive", "0", DRIVE_FIXED);
+        add_drive('C', "../harddiskvolume1", "Virtual Windows Drive", "0", DRIVE_FIXED);
     }
     else
     {
diff --git a/programs/winecfg/driveui.c b/programs/winecfg/driveui.c
index ea80889..2dfc2a4 100644
--- a/programs/winecfg/driveui.c
+++ b/programs/winecfg/driveui.c
@@ -342,7 +342,7 @@ static void on_add_click(HWND dialog)
 
     WINE_TRACE("allocating drive letter %c\n", new);
 
-    if (new == 'C') add_drive(new, "../drive_c", "System Drive", "", DRIVE_FIXED);
+    if (new == 'C') add_drive(new, "../harddiskvolume1", "System Drive", "", DRIVE_FIXED);
     else add_drive(new, "/", "", "", DRIVE_UNKNOWN);
 
     fill_drives_list(dialog);
@@ -525,7 +525,7 @@ static void on_edit_changed(HWND dialog,
 
             path = get_text(dialog, id);
             HeapFree(GetProcessHeap(), 0, current_drive->unixpath);
-            current_drive->unixpath = path ? path : strdupA("drive_c");
+            current_drive->unixpath = path ? path : strdupA("harddiskvolume1");
 
             WINE_TRACE("set path to %s\n", current_drive->unixpath);
 
diff --git a/tools/wineprefixcreate.in b/tools/wineprefixcreate.in
index 3effdb5..dcff18c 100644
--- a/tools/wineprefixcreate.in
+++ b/tools/wineprefixcreate.in
@@ -142,8 +142,8 @@ WINEPREFIX=`cd "$WINEPREFIX" && pwd`
 if [ ! -d "$WINEPREFIX/dosdevices" ]
 then
     mkdir "$WINEPREFIX/dosdevices"
-    [ -d "$WINEPREFIX/drive_c" ] || mkdir "$WINEPREFIX/drive_c"
-    ln -s "../drive_c" "$WINEPREFIX/dosdevices/c:"
+    [ -d "$WINEPREFIX/harddiskvolume1" ] || mkdir "$WINEPREFIX/harddiskvolume1"
+    ln -s "../harddiskvolume1" "$WINEPREFIX/dosdevices/c:"
     ln -s "/" "$WINEPREFIX/dosdevices/z:"
 fi
 


Reply via email to