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
fddd703b
Commit
fddd703b
authored
Jul 26, 2006
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 27, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi: Change '/'->'\' only for file protocol in UrlCanonicalize.
parent
ae154d44
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
path.c
dlls/shlwapi/tests/path.c
+2
-0
url.c
dlls/shlwapi/url.c
+7
-1
No files found.
dlls/shlwapi/tests/path.c
View file @
fddd703b
...
...
@@ -75,6 +75,8 @@ const TEST_URL_CANONICALIZE TEST_CANONICALIZE[] = {
{
"file:///c://tests/foo%20bar"
,
URL_FILE_USE_PATHURL
,
S_OK
,
"file://c:
\\\\
tests
\\
foo bar"
},
{
"file:///c:
\\
tests
\\
foo bar"
,
0
,
S_OK
,
"file:///c:/tests/foo bar"
},
{
"file:///c:
\\
tests
\\
foo bar"
,
URL_DONT_SIMPLIFY
,
S_OK
,
"file:///c:/tests/foo bar"
},
{
"http://www.winehq.org/site/about"
,
URL_FILE_USE_PATHURL
,
S_OK
,
"http://www.winehq.org/site/about"
},
{
"file_://www.winehq.org/site/about"
,
URL_FILE_USE_PATHURL
,
S_OK
,
"file_://www.winehq.org/site/about"
},
};
typedef
struct
_TEST_URL_ESCAPE
{
...
...
dlls/shlwapi/url.c
View file @
fddd703b
...
...
@@ -330,7 +330,9 @@ HRESULT WINAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized,
LPWSTR
lpszUrlCpy
,
wk1
,
wk2
,
mp
,
mp2
,
root
;
INT
nByteLen
,
state
;
DWORD
nLen
,
nWkLen
;
WCHAR
slash
=
dwFlags
&
URL_FILE_USE_PATHURL
?
'\\'
:
'/'
;
WCHAR
slash
=
'/'
;
static
const
WCHAR
wszFile
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
,
':'
};
TRACE
(
"(%s %p %p 0x%08lx)
\n
"
,
debugstr_w
(
pszUrl
),
pszCanonicalized
,
pcchCanonicalized
,
dwFlags
);
...
...
@@ -341,6 +343,10 @@ HRESULT WINAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized,
nByteLen
=
(
lstrlenW
(
pszUrl
)
+
1
)
*
sizeof
(
WCHAR
);
/* length in bytes */
lpszUrlCpy
=
HeapAlloc
(
GetProcessHeap
(),
0
,
nByteLen
);
if
((
dwFlags
&
URL_FILE_USE_PATHURL
)
&&
nByteLen
>=
sizeof
(
wszFile
)
&&
!
memcmp
(
wszFile
,
pszUrl
,
sizeof
(
wszFile
)))
slash
=
'\\'
;
/*
* state =
* 0 initial 1,3
...
...
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