Commit 8dfbcd49 authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Vitaly Lipatov

shlwapi: UrlCombineW workaround for relative paths

parent 81cf4abb
......@@ -4873,7 +4873,10 @@ HRESULT WINAPI UrlCombineW(const WCHAR *baseW, const WCHAR *relativeW, WCHAR *co
work = preliminary + base.cchProtocol + 1 + base.cchSuffix - 1;
if (*work++ != '/')
*(work++) = '/';
lstrcpyW(work, relative.pszSuffix);
if (relative.pszSuffix[0] == '.' && relative.pszSuffix[1] == 0)
*work = 0;
else
lstrcpyW(work, relative.pszSuffix);
break;
default:
......
......@@ -348,6 +348,8 @@ static const TEST_URL_COMBINE TEST_COMBINE[] = {
{"http://www.winehq.org/test14#aaa/bbb#ccc", "#", 0, "http://www.winehq.org/test14#"},
{"http://www.winehq.org/tests/?query=x/y/z", "tests15", 0, "http://www.winehq.org/tests/tests15"},
{"http://www.winehq.org/tests/?query=x/y/z#example", "tests16", 0, "http://www.winehq.org/tests/tests16"},
{"http://www.winehq.org/tests17", ".", 0, "http://www.winehq.org/"},
{"http://www.winehq.org/tests18/test", ".", 0, "http://www.winehq.org/tests18/"},
{"file:///C:\\dir\\file.txt", "test.txt", 0, "file:///C:/dir/test.txt"},
{"file:///C:\\dir\\file.txt#hash\\hash", "test.txt", 0, "file:///C:/dir/file.txt#hash/test.txt"},
{"file:///C:\\dir\\file.html#hash\\hash", "test.html", 0, "file:///C:/dir/test.html"},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment