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
fa0491f2
Commit
fa0491f2
authored
Feb 03, 2020
by
Kevin Puetz
Committed by
Alexandre Julliard
Feb 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Use GetFinalPathNameByHandle to canonicalize file path.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fecd13e1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
21 deletions
+1
-21
typelib.c
dlls/oleaut32/typelib.c
+1
-21
No files found.
dlls/oleaut32/typelib.c
View file @
fa0491f2
...
...
@@ -3335,27 +3335,7 @@ static HRESULT TLB_ReadTypeLib(LPCWSTR pszFileName, LPWSTR pszPath, UINT cchPath
h
=
CreateFileW
(
pszPath
,
GENERIC_READ
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
if
(
h
!=
INVALID_HANDLE_VALUE
){
FILE_NAME_INFORMATION
size_info
;
BOOL
br
;
/* GetFileInformationByHandleEx returns the path of the file without
* WOW64 redirection */
br
=
GetFileInformationByHandleEx
(
h
,
FileNameInfo
,
&
size_info
,
sizeof
(
size_info
));
if
(
br
||
GetLastError
()
==
ERROR_MORE_DATA
){
FILE_NAME_INFORMATION
*
info
;
DWORD
size
=
sizeof
(
*
info
)
+
size_info
.
FileNameLength
+
sizeof
(
WCHAR
);
info
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
br
=
GetFileInformationByHandleEx
(
h
,
FileNameInfo
,
info
,
size
);
if
(
br
){
info
->
FileName
[
info
->
FileNameLength
/
sizeof
(
WCHAR
)]
=
0
;
lstrcpynW
(
pszPath
+
2
,
info
->
FileName
,
cchPath
-
2
);
}
HeapFree
(
GetProcessHeap
(),
0
,
info
);
}
GetFinalPathNameByHandleW
(
h
,
pszPath
,
cchPath
,
FILE_NAME_NORMALIZED
|
VOLUME_NAME_DOS
);
CloseHandle
(
h
);
}
...
...
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