Commit 2a5682d9 authored by Daniel Lehman's avatar Daniel Lehman Committed by Alexandre Julliard

kernelbase: Handle UNC path in UrlApplySchemeW.

Fixes loading XML from a UNC path. Signed-off-by: 's avatarDaniel Lehman <dlehman@esri.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent ebc60f64
......@@ -4020,7 +4020,7 @@ HRESULT WINAPI UrlApplySchemeW(const WCHAR *url, WCHAR *out, DWORD *length, DWOR
if (flags & URL_APPLY_GUESSFILE)
{
if (*length > 1 && ':' == url[1])
if ((*length > 1 && ':' == url[1]) || PathIsUNCW(url))
{
res1 = *length;
hr = url_create_from_path(url, out, &res1);
......
......@@ -97,6 +97,11 @@ static const TEST_URL_APPLY TEST_APPLY[] = {
{"u:\\windows", URL_APPLY_DEFAULT, S_OK, 17, "http://u:\\windows"},
{"file:///c:/windows", URL_APPLY_GUESSFILE , S_FALSE, TEST_APPLY_MAX_LENGTH, untouchedA},
{"aa:\\windows", URL_APPLY_GUESSFILE , S_FALSE, TEST_APPLY_MAX_LENGTH, untouchedA},
{"\\\\server\\share", URL_APPLY_DEFAULT, S_OK, 21, "http://\\\\server\\share"},
{"\\\\server\\share", URL_APPLY_GUESSFILE, S_OK, 19, "file://server/share"},
{"\\\\server\\share", URL_APPLY_GUESSSCHEME, S_FALSE, TEST_APPLY_MAX_LENGTH, untouchedA},
{"file://server/share", URL_APPLY_GUESSFILE, S_FALSE, TEST_APPLY_MAX_LENGTH, untouchedA},
{"file://server/share", URL_APPLY_GUESSSCHEME, S_FALSE, TEST_APPLY_MAX_LENGTH, untouchedA},
};
/* ################ */
......
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