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
3efe4e68
Commit
3efe4e68
authored
May 10, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
May 12, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Correctly handle file URLs with '|' instead of ':' after drive letter.
parent
ad0e82e1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
file.c
dlls/urlmon/file.c
+3
-0
protocol.c
dlls/urlmon/tests/protocol.c
+10
-7
No files found.
dlls/urlmon/file.c
View file @
3efe4e68
...
...
@@ -154,6 +154,9 @@ static HRESULT WINAPI FileProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
}
}
if
(
file_name
[
1
]
==
'|'
)
file_name
[
1
]
=
':'
;
This
->
file
=
CreateFileW
(
file_name
,
GENERIC_READ
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
...
...
dlls/urlmon/tests/protocol.c
View file @
3efe4e68
...
...
@@ -27,6 +27,7 @@
#include "winbase.h"
#include "ole2.h"
#include "urlmon.h"
#include "wininet.h"
#include "initguid.h"
...
...
@@ -1387,7 +1388,7 @@ static void test_file_protocol_fail(void)
}
static
void
test_file_protocol
(
void
)
{
WCHAR
buf
[
MAX_PATH
];
WCHAR
buf
[
INTERNET_MAX_URL_LENGTH
],
file_name_buf
[
MAX_PATH
];
DWORD
size
;
ULONG
len
;
HANDLE
file
;
...
...
@@ -1429,17 +1430,19 @@ static void test_file_protocol(void) {
test_file_protocol_url
(
buf
);
memcpy
(
buf
,
wszFile2
,
sizeof
(
wszFile2
));
len
=
sizeof
(
wszFile2
)
/
sizeof
(
WCHAR
)
-
1
;
len
+=
GetCurrentDirectoryW
(
sizeof
(
buf
)
/
sizeof
(
WCHAR
)
-
len
,
buf
+
len
);
buf
[
len
++
]
=
'\\'
;
memcpy
(
buf
+
len
,
wszIndexHtml
,
sizeof
(
wszIndexHtml
));
file_name
=
buf
+
sizeof
(
wszFile2
)
/
sizeof
(
WCHAR
)
-
1
;
len
=
GetCurrentDirectoryW
(
sizeof
(
file_name_buf
)
/
sizeof
(
WCHAR
),
file_name_buf
);
file_name_buf
[
len
++
]
=
'\\'
;
memcpy
(
file_name_buf
+
len
,
wszIndexHtml
,
sizeof
(
wszIndexHtml
));
lstrcpyW
(
buf
+
sizeof
(
wszFile2
)
/
sizeof
(
WCHAR
)
-
1
,
file_name_buf
);
file_name
=
file_name_buf
;
bindf
=
0
;
test_file_protocol_url
(
buf
);
bindf
=
BINDF_FROMURLMON
;
test_file_protocol_url
(
buf
);
buf
[
sizeof
(
wszFile2
)
/
sizeof
(
WCHAR
)]
=
'|'
;
test_file_protocol_url
(
buf
);
memcpy
(
buf
,
wszFile3
,
sizeof
(
wszFile3
));
len
=
sizeof
(
wszFile3
)
/
sizeof
(
WCHAR
)
-
1
;
len
+=
GetCurrentDirectoryW
(
sizeof
(
buf
)
/
sizeof
(
WCHAR
)
-
len
,
buf
+
len
);
...
...
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