kernelbase: Ignore URL_PARTFLAG_KEEPSCHEME for file URLs.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2022-02-13 12:44:01 -06:00 committed by Alexandre Julliard
parent 2db68d8191
commit 05e82ba113
2 changed files with 3 additions and 3 deletions

View File

@ -4420,7 +4420,7 @@ HRESULT WINAPI UrlGetPartW(const WCHAR *url, WCHAR *out, DWORD *out_len, DWORD p
return E_INVALIDARG;
}
if (flags == URL_PARTFLAG_KEEPSCHEME)
if (flags == URL_PARTFLAG_KEEPSCHEME && scheme != URL_SCHEME_FILE)
{
if (!pl.scheme || !pl.scheme_len)
{

View File

@ -683,7 +683,7 @@ static void test_UrlGetPart(void)
{"http:///index.html", URL_PART_HOSTNAME, 0, S_FALSE, ""},
{"http:///index.html", URL_PART_HOSTNAME, URL_PARTFLAG_KEEPSCHEME, S_OK, "http:", .todo_hr = TRUE},
{"file://h o s t/c:/windows/file", URL_PART_HOSTNAME, 0, S_OK, "h o s t"},
{"file://h o s t/c:/windows/file", URL_PART_HOSTNAME, URL_PARTFLAG_KEEPSCHEME, S_OK, "h o s t", .todo_result = TRUE},
{"file://h o s t/c:/windows/file", URL_PART_HOSTNAME, URL_PARTFLAG_KEEPSCHEME, S_OK, "h o s t"},
{"file://foo:bar@localhost:21/file?query=x", URL_PART_USERNAME, 0, E_FAIL, .todo_hr = TRUE},
{"file://foo:bar@localhost:21/file?query=x", URL_PART_PASSWORD, 0, E_FAIL, .todo_hr = TRUE},
{"file://foo:bar@localhost:21/file?query=x", URL_PART_HOSTNAME, 0, S_OK, "foo:bar@localhost:21", .todo_result = TRUE},
@ -737,7 +737,7 @@ static void test_UrlGetPart(void)
{"vbscript://hostname/", URL_PART_HOSTNAME, 0, E_FAIL},
{"wais://hostname/", URL_PART_HOSTNAME, 0, E_FAIL},
{"file://hostname/", URL_PART_HOSTNAME, URL_PARTFLAG_KEEPSCHEME, S_OK, "hostname", .todo_result = TRUE},
{"file://hostname/", URL_PART_HOSTNAME, URL_PARTFLAG_KEEPSCHEME, S_OK, "hostname"},
{"ftp://hostname/", URL_PART_HOSTNAME, URL_PARTFLAG_KEEPSCHEME, S_OK, "ftp:hostname"},
{"gopher://hostname/", URL_PART_HOSTNAME, URL_PARTFLAG_KEEPSCHEME, S_OK, "gopher:hostname"},
{"http://hostname/", URL_PART_HOSTNAME, URL_PARTFLAG_KEEPSCHEME, S_OK, "http:hostname"},