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
283012cc
Commit
283012cc
authored
Jun 19, 2008
by
Petr Dlouhý
Committed by
Alexandre Julliard
Jun 21, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi: UrlCanonicalize will canonize address in format "
file://localhost/c:/
" correctly.
parent
4513fb38
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
url.c
dlls/shlwapi/tests/url.c
+4
-0
url.c
dlls/shlwapi/url.c
+7
-0
No files found.
dlls/shlwapi/tests/url.c
View file @
283012cc
...
...
@@ -74,6 +74,10 @@ static const TEST_URL_CANONICALIZE TEST_CANONICALIZE[] = {
{
"file:///c:/tests
\\
foo%20bar"
,
URL_UNESCAPE
,
S_OK
,
"file:///c:/tests/foo bar"
,
FALSE
},
{
"file:///c:/tests/foo%20bar"
,
0
,
S_OK
,
"file:///c:/tests/foo%20bar"
,
FALSE
},
{
"file:///c:/tests/foo%20bar"
,
URL_FILE_USE_PATHURL
,
S_OK
,
"file://c:
\\
tests
\\
foo bar"
,
FALSE
},
{
"file://localhost/c:/tests/../tests/foo%20bar"
,
URL_FILE_USE_PATHURL
,
S_OK
,
"file://c:
\\
tests
\\
foo bar"
,
FALSE
},
{
"file://localhost
\\
c:/tests/../tests/foo%20bar"
,
URL_FILE_USE_PATHURL
,
S_OK
,
"file://c:
\\
tests
\\
foo bar"
,
FALSE
},
{
"file://localhost
\\\\
c:/tests/../tests/foo%20bar"
,
URL_FILE_USE_PATHURL
,
S_OK
,
"file://c:
\\
tests
\\
foo bar"
,
FALSE
},
{
"file://localhost
\\
c:
\\
tests/../tests/foo%20bar"
,
URL_FILE_USE_PATHURL
,
S_OK
,
"file://c:
\\
tests
\\
foo bar"
,
FALSE
},
{
"file://c:/tests/../tests/foo%20bar"
,
URL_FILE_USE_PATHURL
,
S_OK
,
"file://c:
\\
tests
\\
foo bar"
,
FALSE
},
{
"file://c:/tests
\\
../tests/foo%20bar"
,
URL_FILE_USE_PATHURL
,
S_OK
,
"file://c:
\\
tests
\\
foo bar"
,
FALSE
},
{
"file://c:/tests/foo%20bar"
,
URL_FILE_USE_PATHURL
,
S_OK
,
"file://c:
\\
tests
\\
foo bar"
,
FALSE
},
...
...
dlls/shlwapi/url.c
View file @
283012cc
...
...
@@ -319,6 +319,7 @@ HRESULT WINAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized,
WCHAR
slash
=
'/'
;
static
const
WCHAR
wszFile
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
,
':'
};
static
const
WCHAR
wszLocalhost
[]
=
{
'l'
,
'o'
,
'c'
,
'a'
,
'l'
,
'h'
,
'o'
,
's'
,
't'
};
TRACE
(
"(%s, %p, %p, 0x%08x) *pcchCanonicalized: %d
\n
"
,
debugstr_w
(
pszUrl
),
pszCanonicalized
,
pcchCanonicalized
,
dwFlags
,
pcchCanonicalized
?
*
pcchCanonicalized
:
-
1
);
...
...
@@ -387,6 +388,12 @@ HRESULT WINAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized,
*
wk2
++
=
*
wk1
++
;
if
(
*
wk1
!=
'/'
)
{
state
=
6
;
break
;}
*
wk2
++
=
*
wk1
++
;
if
((
dwFlags
&
URL_FILE_USE_PATHURL
)
&&
nByteLen
>=
sizeof
(
wszLocalhost
)
&&
!
memcmp
(
wszLocalhost
,
wk1
,
sizeof
(
wszLocalhost
))){
wk1
+=
sizeof
(
wszLocalhost
)
/
sizeof
(
WCHAR
);
while
(
*
wk1
==
'\\'
&&
(
dwFlags
&
URL_FILE_USE_PATHURL
))
wk1
++
;
}
if
(
*
wk1
==
'/'
&&
(
dwFlags
&
URL_FILE_USE_PATHURL
))
wk1
++
;
state
=
4
;
...
...
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