kernel32: Deal with unix paths in wine_get_dos_file_name.

This commit is contained in:
Damjan Jovanovic 2010-07-22 21:38:59 +02:00 committed by Alexandre Julliard
parent 2f877b0a79
commit f56be472c6

View File

@ -1788,10 +1788,15 @@ WCHAR * CDECL wine_get_dos_file_name( LPCSTR str )
SetLastError( RtlNtStatusToDosError( status ) ); SetLastError( RtlNtStatusToDosError( status ) );
return NULL; return NULL;
} }
/* get rid of the \??\ prefix */ if (nt_name.Buffer[5] == ':')
/* FIXME: should implement RtlNtPathNameToDosPathName and use that instead */ {
len = nt_name.Length - 4 * sizeof(WCHAR); /* get rid of the \??\ prefix */
memmove( nt_name.Buffer, nt_name.Buffer + 4, len ); /* FIXME: should implement RtlNtPathNameToDosPathName and use that instead */
nt_name.Buffer[len / sizeof(WCHAR)] = 0; len = nt_name.Length - 4 * sizeof(WCHAR);
memmove( nt_name.Buffer, nt_name.Buffer + 4, len );
nt_name.Buffer[len / sizeof(WCHAR)] = 0;
}
else
nt_name.Buffer[1] = '\\';
return nt_name.Buffer; return nt_name.Buffer;
} }