[winecfg] Do not apply changes just because QueryDosDevice reversed the slashes

Mike Hearn mike at navi.cx
Fri Jan 7 10:04:40 CST 2005


Do not apply changes just because QueryDosDevice reversed the slashes
Change an ERR to a WARN, it's common for it to occur


-------------- next part --------------
--- drive.c  (revision 72)
+++ drive.c  (local)
@@ -286,6 +286,11 @@ void apply_drive_changes()
         /* get a drive */
         if(QueryDosDevice(devicename, targetpath, sizeof(targetpath)))
         {
+            char *cursor;
+            
+            /* correct the slashes in the path to be UNIX style */
+            while ((cursor = strchr(targetpath, '\\'))) *cursor = '/';
+
             foundDrive = TRUE;
         }
 
@@ -386,7 +391,7 @@ void apply_drive_changes()
                 snprintf(devicename, sizeof(devicename), "%c:\\", 'A' + i);
                 if(!SetVolumeLabel(devicename, drives[i].label))
                 {
-                    WINE_ERR("unable to set volume label for devicename of '%s', label of '%s'\n",
+                    WINE_WARN("unable to set volume label for devicename of '%s', label of '%s'\n",
                         devicename, drives[i].label);
                     PRINTERROR();
                 }


More information about the wine-patches mailing list