Always add a \ to temp file path
Mike Hearn
mike at theoretic.com
Tue Dec 16 13:49:57 CST 2003
The NullSoft installer assumes this will be present, so it most likely
always is on Windows. When I get a cross compiler setup (soon, promise!)
I'll try writing a test case for this behaviour.
Mike Hearn <mike at theoretic.com>
Always add a \ to temp file path. Add a warning to DeleteFile.
Index: files/file.c
===================================================================
RCS file: /home/wine/wine/files/file.c,v
retrieving revision 1.196
diff -u -r1.196 file.c
--- files/file.c 12 Dec 2003 04:10:52 -0000 1.196
+++ files/file.c 16 Dec 2003 19:47:04 -0000
@@ -921,10 +921,8 @@
strcpyW( buffer, path );
p = buffer + strlenW(buffer);
- /* add a \, if there isn't one and path is more than just the drive letter ... */
- if ( !((strlenW(buffer) == 2) && (buffer[1] == ':'))
- && ((p == buffer) || (p[-1] != '\\'))) *p++ = '\\';
-
+ *p++ = '\\';
+
for (i = 3; (i > 0) && (*prefix); i--) *p++ = *prefix++;
unique &= 0xffff;
@@ -1556,7 +1554,11 @@
return FALSE;
}
- if (!DOSFS_GetFullName( path, TRUE, &full_name )) return FALSE;
+ if (!DOSFS_GetFullName( path, TRUE, &full_name ))
+ {
+ WARN("Unable to get full name from %s\n", debugstr_w(path));
+ return FALSE;
+ }
/* check if we are allowed to delete the source */
hFile = FILE_CreateFile( full_name.long_name, GENERIC_READ|GENERIC_WRITE, 0,
More information about the wine-patches
mailing list