shlwapi: Don't add a trailing slash in the case that nothing has to be appended to relative, with testcase.

This commit is contained in:
Maarten Lankhorst 2008-02-26 12:09:39 -08:00 committed by Alexandre Julliard
parent 7e584e4add
commit b254b407a4
2 changed files with 1 additions and 4 deletions

View File

@ -206,6 +206,7 @@ static const TEST_URL_COMBINE TEST_COMBINE[] = {
{"http://www.winehq.org/tests/../tests/", "/tests10/..", URL_DONT_SIMPLIFY, S_OK, "http://www.winehq.org/tests10/.."},
{"http://www.winehq.org/tests/../", "tests11", URL_DONT_SIMPLIFY, S_OK, "http://www.winehq.org/tests/../tests11"},
{"file:///C:\\dir\\file.txt", "test.txt", 0, S_OK, "file:///C:/dir/test.txt"},
{"C:\\winehq\\winehq.txt", "C:\\Test\\test.txt", 0, S_OK, "file:///C:/Test/test.txt"},
{"http://www.winehq.org/test/", "test%20file.txt", 0, S_OK, "http://www.winehq.org/test/test%20file.txt"},
{"http://www.winehq.org/test/", "test%20file.txt", URL_FILE_USE_PATHURL, S_OK, "http://www.winehq.org/test/test%20file.txt"},
{"http://www.winehq.org%2ftest/", "test%20file.txt", URL_FILE_USE_PATHURL, S_OK, "http://www.winehq.org%2ftest/test%20file.txt"},

View File

@ -752,7 +752,6 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative,
break;
} while(FALSE); /* a litte trick to allow easy exit from nested if's */
ret = S_OK;
switch (process_case) {
@ -780,9 +779,6 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative,
memcpy(preliminary, base.pszProtocol, (base.cchProtocol + 1)*sizeof(WCHAR));
work = preliminary + base.cchProtocol + 1;
strcpyW(work, relative.pszSuffix);
if (!(dwFlags & URL_PLUGGABLE_PROTOCOL) &&
URL_JustLocation(relative.pszSuffix))
strcatW(work, single_slash);
break;
case 4: /*