DOSFS_DoGetFullPathName patch.

Rein Klazes rklazes at xs4all.nl
Sat Aug 24 07:19:37 CDT 2002


Hi,

In some situation GetFullPathName returns something like
'X:\\foo\bar'. The application for some reason strips the drive spec
form it leaving '\\foo\bar' which is an UNC name, and the file not
found.

Changelog:

	files/	: dos_fs.c
	
	In DOSFS_DoGetFullPathNamePrevent two consecutive slashes in 
	the returned string.

Rein.
-- 
Rein Klazes
rklazes at xs4all.nl
-------------- next part --------------
--- wine/files/dos_fs.c	2002-08-17 02:43:19.000000000 +0200
+++ mywine/files/dos_fs.c	2002-08-24 12:50:47.000000000 +0200
@@ -1317,8 +1317,10 @@
 	    FIXME("internal error: buffer too small\n");
 	     return 0;
 	  }
-	full_name.short_name[namelen++] ='\\';
-	full_name.short_name[namelen] = 0;
+        if( p[0] != '\\' && p[0] != '/') {
+            full_name.short_name[namelen++] ='\\';
+            full_name.short_name[namelen] = 0;
+        }
 	lstrcpynA(full_name.short_name +namelen,p,MAX_PATHNAME_LEN-namelen);
       }
     /* reverse all slashes */


More information about the wine-patches mailing list