+2009-07-15 Corinna Vinschen <corinna@vinschen.de>
+
+ * path.cc (cwdstuff::set): Only fix up UNC path in win32 so as not
+ to overwrite incoming path.
+
2009-07-14 Corinna Vinschen <corinna@vinschen.de>
Throughout avoid having to initialize constant UNICODE_STRINGs.
}
else
{
+ bool unc = false;
+
if (upath.Buffer[0] == L'/') /* Virtual path, don't mangle. */
;
else if (!doit)
/* Convert to a Win32 path. */
upath.Buffer += upath.Length / sizeof (WCHAR) - len;
if (upath.Buffer[1] == L'\\') /* UNC path */
- upath.Buffer[0] = L'\\';
+ unc = true;
upath.Length = len * sizeof (WCHAR);
}
else
upath.Length + 2),
upath.Length + 2);
RtlCopyUnicodeString (&win32, &upath);
+ if (unc)
+ win32.Buffer[0] = L'\\';
}
/* Make sure it's NUL-terminated. */
win32.Buffer[win32.Length / sizeof (WCHAR)] = L'\0';