Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
3ceaaae3
Commit
3ceaaae3
authored
May 10, 2007
by
Damjan Jovanovic
Committed by
Alexandre Julliard
May 11, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi: Fix UrlCanonicalizeW's handling of filesystem paths.
parent
b504d050
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
path.c
dlls/shlwapi/tests/path.c
+3
-6
url.c
dlls/shlwapi/url.c
+7
-0
No files found.
dlls/shlwapi/tests/path.c
View file @
3ceaaae3
...
...
@@ -68,6 +68,7 @@ const TEST_URL_CANONICALIZE TEST_CANONICALIZE[] = {
{
"http://www.winehq.org/tests/foo%20bar"
,
URL_UNESCAPE
,
S_OK
,
"http://www.winehq.org/tests/foo bar"
},
{
"file:///c:/tests/foo%20bar"
,
URL_UNESCAPE
,
S_OK
,
"file:///c:/tests/foo bar"
},
{
"file:///c:/tests
\\
foo%20bar"
,
URL_UNESCAPE
,
S_OK
,
"file:///c:/tests/foo bar"
},
{
"file:///c:/tests/foo%20bar"
,
0
,
S_OK
,
"file:///c:/tests/foo%20bar"
},
{
"file:///c:/tests/foo%20bar"
,
URL_FILE_USE_PATHURL
,
S_OK
,
"file://c:
\\
tests
\\
foo bar"
},
{
"file://c:/tests/../tests/foo%20bar"
,
URL_FILE_USE_PATHURL
,
S_OK
,
"file://c:
\\
tests
\\
foo bar"
},
{
"file://c:/tests
\\
../tests/foo%20bar"
,
URL_FILE_USE_PATHURL
,
S_OK
,
"file://c:
\\
tests
\\
foo bar"
},
...
...
@@ -80,6 +81,8 @@ const TEST_URL_CANONICALIZE TEST_CANONICALIZE[] = {
{
"c:
\\
dir
\\
file"
,
0
,
S_OK
,
"file:///c:/dir/file"
},
{
"file:///c:
\\
dir
\\
file"
,
0
,
S_OK
,
"file:///c:/dir/file"
},
{
"c:dir
\\
file"
,
0
,
S_OK
,
"file:///c:dir/file"
},
{
"c:
\\
tests
\\
foo bar"
,
URL_FILE_USE_PATHURL
,
S_OK
,
"file://c:
\\
tests
\\
foo bar"
},
{
"c:
\\
tests
\\
foo bar"
,
0
,
S_OK
,
"file:///c:/tests/foo%20bar"
},
{
"A"
,
0
,
S_OK
,
"A"
},
{
""
,
0
,
S_OK
,
""
}
};
...
...
@@ -509,12 +512,6 @@ static void test_UrlCanonicalize(void)
/* move to TEST_CANONICALIZE when fixed */
dwSize
=
sizeof
szReturnUrl
;
ok
(
UrlCanonicalizeA
(
"c:
\\
tests
\\
foo bar"
,
szReturnUrl
,
&
dwSize
,
0
)
==
S_OK
,
"UrlCanonicalizeA didn't return 0x%08x
\n
"
,
S_OK
);
todo_wine
{
ok
(
strcmp
(
szReturnUrl
,
"file:///c:/tests/foo%20bar"
)
==
0
,
"UrlCanonicalizeA got %s
\n
"
,
szReturnUrl
);
}
dwSize
=
sizeof
szReturnUrl
;
/*LimeWire online installer calls this*/
hr
=
UrlCanonicalizeA
(
"/uri-res/N2R?urn:sha1:B3K"
,
szReturnUrl
,
&
dwSize
,
URL_DONT_ESCAPE_EXTRA_INFO
|
URL_WININET_COMPATIBILITY
/*0x82000000*/
);
ok
(
hr
==
S_OK
,
"UrlCanonicalizeA returned 0x%08x instead of S_OK
\n
"
,
hr
);
...
...
dlls/shlwapi/url.c
View file @
3ceaaae3
...
...
@@ -358,6 +358,13 @@ HRESULT WINAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized,
memcpy
(
wk2
,
wszFilePrefix
,
sizeof
(
wszFilePrefix
));
wk2
+=
sizeof
(
wszFilePrefix
)
/
sizeof
(
WCHAR
);
if
(
dwFlags
&
URL_FILE_USE_PATHURL
)
{
slash
=
'\\'
;
--
wk2
;
}
else
dwFlags
|=
URL_ESCAPE_UNSAFE
;
state
=
5
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment