absolute path bugfix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



LICENSE: X11

CHANGELOG:

* files/dos_fs.c: Greg Turner <gmturner007@ameritech.net>
- fix nasty bug in DOSFS_GetFullName when absolute
  unix paths are used.  winedbg finds sources again.

-- 
gmt

"The purpose of government is to rein in the rights of the people"
 --President Bill Clinton, MTV interview, 1993
Index: files/dos_fs.c
===================================================================
RCS file: /home/wine/wine/files/dos_fs.c,v
retrieving revision 1.122
diff -u -r1.122 dos_fs.c
--- files/dos_fs.c	25 Oct 2002 03:32:11 -0000	1.122
+++ files/dos_fs.c	26 Oct 2002 06:05:41 -0000
@@ -1005,7 +1005,7 @@
  */
 BOOL DOSFS_GetFullName( LPCWSTR name, BOOL check_last, DOS_FULL_NAME *full )
 {
-    BOOL found;
+    BOOL found, unix_root;
     UINT flags, codepage;
     char *p_l, *root;
     LPWSTR p_s;
@@ -1020,6 +1020,8 @@
         return FALSE;
     }
 
+    unix_root = (*name == '/');
+
     if ((full->drive = DOSFS_GetPathDrive( &name )) == -1) return FALSE;
     flags = DRIVE_GetFlags( full->drive );
     codepage = DRIVE_GetCodepage(full->drive);
@@ -1032,7 +1034,7 @@
     strcpyW( full->short_name, driveA_rootW );
     full->short_name[0] += full->drive;
 
-    if ((*name == '\\') || (*name == '/'))  /* Absolute path */
+    if ((*name == '\\') || (*name == '/') || unix_root)  /* Absolute path */
     {
         while ((*name == '\\') || (*name == '/')) name++;
     }

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux