Maarten Lankhorst : shlwapi: Don' t add a trailing slash in the case that nothing has to be appended to relative , with testcase.
Alexandre Julliard
julliard at winehq.org
Wed Feb 27 08:03:18 CST 2008
Module: wine
Branch: master
Commit: b254b407a494633127c3977a27794b958c776174
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b254b407a494633127c3977a27794b958c776174
Author: Maarten Lankhorst <m.b.lankhorst at gmail.com>
Date: Tue Feb 26 12:09:39 2008 -0800
shlwapi: Don't add a trailing slash in the case that nothing has to be appended to relative, with testcase.
---
dlls/shlwapi/tests/url.c | 1 +
dlls/shlwapi/url.c | 4 ----
2 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/dlls/shlwapi/tests/url.c b/dlls/shlwapi/tests/url.c
index 87b8b1d..2d63a21 100644
--- a/dlls/shlwapi/tests/url.c
+++ b/dlls/shlwapi/tests/url.c
@@ -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"},
diff --git a/dlls/shlwapi/url.c b/dlls/shlwapi/url.c
index 01a0919..aa232aa 100644
--- a/dlls/shlwapi/url.c
+++ b/dlls/shlwapi/url.c
@@ -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: /*
More information about the wine-cvs
mailing list