ntdll: Properly set the current directory for UNC paths.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=37834 Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
702e4a4ca1
commit
3acc0b0968
|
@ -1048,6 +1048,14 @@ NTSTATUS WINAPI RtlSetCurrentDirectory_U(const UNICODE_STRING* dir)
|
|||
size -= 4;
|
||||
if (size && ptr[size - 1] != '\\') ptr[size++] = '\\';
|
||||
|
||||
/* convert \??\UNC\ path to \\ prefix */
|
||||
if (size >= 4 && !strncmpiW(ptr, UncPfxW, 4))
|
||||
{
|
||||
ptr += 2;
|
||||
size -= 2;
|
||||
*ptr = '\\';
|
||||
}
|
||||
|
||||
memcpy( curdir->DosPath.Buffer, ptr, size * sizeof(WCHAR));
|
||||
curdir->DosPath.Buffer[size] = 0;
|
||||
curdir->DosPath.Length = size * sizeof(WCHAR);
|
||||
|
|
Loading…
Reference in New Issue