Jacek Caban : shlwapi: Fix handling mk URLs.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Feb 12 09:23:46 CST 2007
Module: wine
Branch: master
Commit: 961627d344d81d113ba590bb67b4ae7277d090c1
URL: http://source.winehq.org/git/wine.git/?a=commit;h=961627d344d81d113ba590bb67b4ae7277d090c1
Author: Jacek Caban <jacek at codeweavers.com>
Date: Sat Feb 10 19:05:25 2007 +0100
shlwapi: Fix handling mk URLs.
---
dlls/shlwapi/tests/path.c | 5 ++++-
dlls/shlwapi/url.c | 16 ++++++++++++++++
2 files changed, 20 insertions(+), 1 deletions(-)
diff --git a/dlls/shlwapi/tests/path.c b/dlls/shlwapi/tests/path.c
index 41f9f14..c91e99f 100644
--- a/dlls/shlwapi/tests/path.c
+++ b/dlls/shlwapi/tests/path.c
@@ -198,7 +198,10 @@ const TEST_URL_COMBINE TEST_COMBINE[] =
{"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"}
+ {"http://www.winehq.org%2ftest/", "test%20file.txt", URL_FILE_USE_PATHURL, S_OK, "http://www.winehq.org%2ftest/test%20file.txt"},
+ {"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"},
};
struct {
diff --git a/dlls/shlwapi/url.c b/dlls/shlwapi/url.c
index 6c88e91..50e608a 100644
--- a/dlls/shlwapi/url.c
+++ b/dlls/shlwapi/url.c
@@ -629,6 +629,22 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBa
process_case = 1;
}
else do {
+ /* mk is a special case */
+ if(base.nScheme == URL_SCHEME_MK) {
+ static const WCHAR wsz[] = {':',':',0};
+
+ WCHAR *ptr = strstrW(base.pszSuffix, wsz);
+ if(ptr) {
+ int delta;
+
+ ptr += 2;
+ delta = ptr-base.pszSuffix;
+ base.cchProtocol += delta;
+ base.pszSuffix += delta;
+ base.cchSuffix -= delta;
+ }
+ }
+
/* get size of location field (if it exists) */
work = (LPWSTR)base.pszSuffix;
sizeloc = 0;
More information about the wine-cvs
mailing list