Commit f56be472 authored by Damjan Jovanovic's avatar Damjan Jovanovic Committed by Alexandre Julliard

kernel32: Deal with unix paths in wine_get_dos_file_name.

parent 2f877b0a
...@@ -1788,10 +1788,15 @@ WCHAR * CDECL wine_get_dos_file_name( LPCSTR str ) ...@@ -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;
} }
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