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
d9d6e49f
Commit
d9d6e49f
authored
Jul 07, 2010
by
Aric Stewart
Committed by
Alexandre Julliard
Jul 08, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi: Correct slash/backslashs in UrlCanonicalize.
parent
b27500aa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
url.c
dlls/shlwapi/tests/url.c
+7
-1
url.c
dlls/shlwapi/url.c
+8
-1
No files found.
dlls/shlwapi/tests/url.c
View file @
d9d6e49f
...
...
@@ -162,7 +162,13 @@ static const TEST_URL_CANONICALIZE TEST_CANONICALIZE[] = {
{
"http:www.winehq.org/dir/../index.html"
,
0
,
S_OK
,
"http:www.winehq.org/index.html"
},
{
"http://localhost/test.html"
,
URL_FILE_USE_PATHURL
,
S_OK
,
"http://localhost/test.html"
},
{
"http://localhost/te%20st.html"
,
URL_FILE_USE_PATHURL
,
S_OK
,
"http://localhost/te%20st.html"
},
{
"http://www.winehq.org/%E6%A1%9C.html"
,
URL_FILE_USE_PATHURL
,
S_OK
,
"http://www.winehq.org/%E6%A1%9C.html"
}
{
"http://www.winehq.org/%E6%A1%9C.html"
,
URL_FILE_USE_PATHURL
,
S_OK
,
"http://www.winehq.org/%E6%A1%9C.html"
},
{
"mk:@MSITStore:C:
\\
Program Files/AutoCAD 2008
\\
Help/acad_acg.chm::/WSfacf1429558a55de1a7524c1004e616f8b-322b.htm"
,
0
,
S_OK
,
"mk:@MSITStore:C:
\\
Program Files/AutoCAD 2008
\\
Help/acad_acg.chm::/WSfacf1429558a55de1a7524c1004e616f8b-322b.htm"
},
{
"ftp:@MSITStore:C:
\\
Program Files/AutoCAD 2008
\\
Help/acad_acg.chm::/WSfacf1429558a55de1a7524c1004e616f8b-322b.htm"
,
0
,
S_OK
,
"ftp:@MSITStore:C:
\\
Program Files/AutoCAD 2008
\\
Help/acad_acg.chm::/WSfacf1429558a55de1a7524c1004e616f8b-322b.htm"
},
{
"file:@MSITStore:C:
\\
Program Files/AutoCAD 2008
\\
Help/acad_acg.chm::/WSfacf1429558a55de1a7524c1004e616f8b-322b.htm"
,
0
,
S_OK
,
"file:@MSITStore:C:/Program Files/AutoCAD 2008/Help/acad_acg.chm::/WSfacf1429558a55de1a7524c1004e616f8b-322b.htm"
},
{
"http:@MSITStore:C:
\\
Program Files/AutoCAD 2008
\\
Help/acad_acg.chm::/WSfacf1429558a55de1a7524c1004e616f8b-322b.htm"
,
0
,
S_OK
,
"http:@MSITStore:C:/Program Files/AutoCAD 2008/Help/acad_acg.chm::/WSfacf1429558a55de1a7524c1004e616f8b-322b.htm"
},
{
"http:@MSITStore:C:
\\
Program Files/AutoCAD 2008
\\
Help/acad_acg.chm::/WSfacf1429558a55de1a7524c1004e616f8b-322b.htm"
,
URL_FILE_USE_PATHURL
,
S_OK
,
"http:@MSITStore:C:/Program Files/AutoCAD 2008/Help/acad_acg.chm::/WSfacf1429558a55de1a7524c1004e616f8b-322b.htm"
},
{
"mk:@MSITStore:C:
\\
Program Files/AutoCAD 2008
\\
Help/acad_acg.chm::/WSfacf1429558a55de1a7524c1004e616f8b-322b.htm"
,
URL_FILE_USE_PATHURL
,
S_OK
,
"mk:@MSITStore:C:
\\
Program Files/AutoCAD 2008
\\
Help/acad_acg.chm::/WSfacf1429558a55de1a7524c1004e616f8b-322b.htm"
},
};
/* ################ */
...
...
dlls/shlwapi/url.c
View file @
d9d6e49f
...
...
@@ -276,10 +276,11 @@ HRESULT WINAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized,
LPWSTR
lpszUrlCpy
,
wk2
,
mp
,
mp2
;
INT
state
;
DWORD
nByteLen
,
nLen
,
nWkLen
;
WCHAR
slash
=
'
/
'
;
WCHAR
slash
=
'
\0
'
;
static
const
WCHAR
wszFile
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
,
':'
};
static
const
WCHAR
wszRes
[]
=
{
'r'
,
'e'
,
's'
,
':'
};
static
const
WCHAR
wszHttp
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
};
static
const
WCHAR
wszLocalhost
[]
=
{
'l'
,
'o'
,
'c'
,
'a'
,
'l'
,
'h'
,
'o'
,
's'
,
't'
};
static
const
WCHAR
wszFilePrefix
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
,
':'
,
'/'
,
'/'
,
'/'
};
...
...
@@ -299,6 +300,12 @@ HRESULT WINAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized,
lpszUrlCpy
=
HeapAlloc
(
GetProcessHeap
(),
0
,
nByteLen
+
sizeof
(
wszFilePrefix
)
+
sizeof
(
WCHAR
));
if
((
nByteLen
>=
sizeof
(
wszHttp
)
&&
!
memcmp
(
wszHttp
,
pszUrl
,
sizeof
(
wszHttp
)))
||
(
nByteLen
>=
sizeof
(
wszFile
)
&&
!
memcmp
(
wszFile
,
pszUrl
,
sizeof
(
wszFile
))))
slash
=
'/'
;
if
((
dwFlags
&
URL_FILE_USE_PATHURL
)
&&
nByteLen
>=
sizeof
(
wszFile
)
&&
!
memcmp
(
wszFile
,
pszUrl
,
sizeof
(
wszFile
)))
slash
=
'\\'
;
...
...
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