Jacek Caban : shlwapi: Don' t unescape url in UrlCombineW with URL_FILE_USE_PATHURL flag.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Feb 5 07:44:49 CST 2007


Module: wine
Branch: master
Commit: dae390d90b8a6415f44e4dcc3d10076f97d31597
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=dae390d90b8a6415f44e4dcc3d10076f97d31597

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Fri Jan 26 18:50:21 2007 +0100

shlwapi: Don't unescape url in UrlCombineW with URL_FILE_USE_PATHURL flag.

---

 dlls/shlwapi/tests/path.c |    5 ++++-
 dlls/shlwapi/url.c        |    2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/dlls/shlwapi/tests/path.c b/dlls/shlwapi/tests/path.c
index 95f7e3f..41f9f14 100644
--- a/dlls/shlwapi/tests/path.c
+++ b/dlls/shlwapi/tests/path.c
@@ -195,7 +195,10 @@ const TEST_URL_COMBINE TEST_COMBINE[] =
     {"http://www.winehq.org/tests/#example", "tests9", 0, S_OK, "http://www.winehq.org/tests/tests9"},
     {"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"}
+    {"file:///C:\\dir\\file.txt", "test.txt", 0, S_OK, "file:///C:/dir/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"}
 };
 
 struct {
diff --git a/dlls/shlwapi/url.c b/dlls/shlwapi/url.c
index e844e6e..e89113f 100644
--- a/dlls/shlwapi/url.c
+++ b/dlls/shlwapi/url.c
@@ -803,7 +803,7 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBa
 
     if (ret == S_OK) {
 	/* Reuse mrelative as temp storage as its already allocated and not needed anymore */
-	ret = UrlCanonicalizeW(preliminary, mrelative, pcchCombined, dwFlags);
+	ret = UrlCanonicalizeW(preliminary, mrelative, pcchCombined, (dwFlags & ~URL_FILE_USE_PATHURL));
 	if(SUCCEEDED(ret) && pszCombined) {
 	    lstrcpyW(pszCombined, mrelative);
 	}




More information about the wine-cvs mailing list