Commit 4c5c7e7a authored by Alexandre Julliard's avatar Alexandre Julliard

Fixed regression caused by previous change.

parent b7937afa
...@@ -1027,6 +1027,7 @@ DWORD WINAPI GetShortPathNameA( LPCSTR longpath, LPSTR shortpath, ...@@ -1027,6 +1027,7 @@ DWORD WINAPI GetShortPathNameA( LPCSTR longpath, LPSTR shortpath,
DWORD sp = 0, lp = 0; DWORD sp = 0, lp = 0;
int tmplen, drive; int tmplen, drive;
UINT flags; UINT flags;
BOOL unixabsolute = *longpath == '/';
TRACE("%s\n", debugstr_a(longpath)); TRACE("%s\n", debugstr_a(longpath));
...@@ -1044,12 +1045,21 @@ DWORD WINAPI GetShortPathNameA( LPCSTR longpath, LPSTR shortpath, ...@@ -1044,12 +1045,21 @@ DWORD WINAPI GetShortPathNameA( LPCSTR longpath, LPSTR shortpath,
return 0; return 0;
} }
/* check for drive letter */
if (!unixabsolute && longpath[1] == ':' ) {
tmpshortpath[0] = longpath[0];
tmpshortpath[1] = ':';
sp = 2;
}
if ( ( drive = DOSFS_GetPathDrive ( &longpath )) == -1 ) return 0; if ( ( drive = DOSFS_GetPathDrive ( &longpath )) == -1 ) return 0;
flags = DRIVE_GetFlags ( drive ); flags = DRIVE_GetFlags ( drive );
tmpshortpath[0] = drive + 'A'; if (unixabsolute && drive != DRIVE_GetCurrentDrive()) {
tmpshortpath[1] = ':'; tmpshortpath[0] = drive + 'A';
sp = 2; tmpshortpath[1] = ':';
sp = 2;
}
while ( longpath[lp] ) { while ( longpath[lp] ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment