Commit acfc1175 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

shlwapi: Fix UrlCombineW for absolute URLs without slashes.

parent fba87b11
...@@ -205,6 +205,10 @@ const TEST_URL_COMBINE TEST_COMBINE[] = { ...@@ -205,6 +205,10 @@ const TEST_URL_COMBINE TEST_COMBINE[] = {
{"xxx:@MSITStore:file.chm/file.html", "dir/file", 0, S_OK, "xxx:dir/file"}, {"xxx:@MSITStore:file.chm/file.html", "dir/file", 0, S_OK, "xxx:dir/file"},
{"mk:@MSITStore:file.chm::/file.html", "/dir/file", 0, S_OK, "mk:@MSITStore:file.chm::/dir/file"}, {"mk:@MSITStore:file.chm::/file.html", "/dir/file", 0, S_OK, "mk:@MSITStore:file.chm::/dir/file"},
{"mk:@MSITStore:file.chm::/file.html", "mk:@MSITStore:file.chm::/dir/file", 0, S_OK, "mk:@MSITStore:file.chm::/dir/file"}, {"mk:@MSITStore:file.chm::/file.html", "mk:@MSITStore:file.chm::/dir/file", 0, S_OK, "mk:@MSITStore:file.chm::/dir/file"},
{"foo:today", "foo:calendar", 0, S_OK, "foo:calendar"},
{"foo:today", "bar:calendar", 0, S_OK, "bar:calendar"},
{"foo:/today", "foo:calendar", 0, S_OK, "foo:/calendar"},
{"foo:/today/", "foo:calendar", 0, S_OK, "foo:/today/calendar"},
}; };
struct { struct {
......
...@@ -736,8 +736,9 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative, ...@@ -736,8 +736,9 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative,
process_case = 4; process_case = 4;
break; break;
} }
/* case where scheme is followed by document path */ /* replace either just location if base's location starts with a
process_case = 5; * slash or otherwise everything */
process_case = (*base.pszSuffix == '/') ? 5 : 1;
break; break;
} }
if ((*relative.pszSuffix == '/') && (*(relative.pszSuffix+1) == '/')) { if ((*relative.pszSuffix == '/') && (*(relative.pszSuffix+1) == '/')) {
......
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