shlwapi: Fix UrlCombineW for absolute URLs without slashes.

This commit is contained in:
Rob Shearman 2007-08-23 16:42:29 +01:00 committed by Alexandre Julliard
parent fba87b110f
commit acfc1175a2
2 changed files with 7 additions and 2 deletions

View File

@ -205,6 +205,10 @@ const TEST_URL_COMBINE TEST_COMBINE[] = {
{"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", "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 {

View File

@ -736,8 +736,9 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative,
process_case = 4;
break;
}
/* case where scheme is followed by document path */
process_case = 5;
/* replace either just location if base's location starts with a
* slash or otherwise everything */
process_case = (*base.pszSuffix == '/') ? 5 : 1;
break;
}
if ((*relative.pszSuffix == '/') && (*(relative.pszSuffix+1) == '/')) {