DOSFS_DoGetFullPathName patch.

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

 



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@xs4all.nl
--- 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 */

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

  Powered by Linux