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
28f7e461
Commit
28f7e461
authored
Apr 04, 2019
by
Piotr Caban
Committed by
Alexandre Julliard
Apr 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi: Fix PathIsContentTypeA implementation.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
232255f3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
13 deletions
+9
-13
path.c
dlls/shlwapi/path.c
+9
-13
No files found.
dlls/shlwapi/path.c
View file @
28f7e461
...
...
@@ -2027,22 +2027,18 @@ BOOL WINAPI PathIsSameRootW(LPCWSTR lpszPath1, LPCWSTR lpszPath2)
* a content type is registered, it is compared (case insensitively) to
* lpszContentType. Only if this matches does the function succeed.
*/
BOOL
WINAPI
PathIsContentTypeA
(
LPCSTR
lpszPath
,
LPCSTR
lpszContentT
ype
)
BOOL
WINAPI
PathIsContentTypeA
(
LPCSTR
path
,
LPCSTR
content_t
ype
)
{
LPCSTR
szExt
;
DWORD
dwDummy
;
char
szBuff
[
MAX_PATH
]
;
char
buf
[
MAX_PATH
]
;
DWORD
size
=
sizeof
(
buf
)
;
LPCSTR
ext
;
TRACE
(
"(%s,%s)
\n
"
,
debugstr_a
(
lpszPath
),
debugstr_a
(
lpszContentT
ype
));
TRACE
(
"(%s,%s)
\n
"
,
debugstr_a
(
path
),
debugstr_a
(
content_t
ype
));
if
(
lpszPath
&&
(
szExt
=
PathFindExtensionA
(
lpszPath
))
&&
*
szExt
&&
!
SHGetValueA
(
HKEY_CLASSES_ROOT
,
szExt
,
"Content Type"
,
REG_NONE
,
szBuff
,
&
dwDummy
)
&&
!
strcasecmp
(
lpszContentType
,
szBuff
))
{
return
TRUE
;
}
return
FALSE
;
if
(
!
path
)
return
FALSE
;
if
(
!
(
ext
=
PathFindExtensionA
(
path
))
||
!*
ext
)
return
FALSE
;
if
(
SHGetValueA
(
HKEY_CLASSES_ROOT
,
ext
,
"Content Type"
,
NULL
,
buf
,
&
size
))
return
FALSE
;
return
!
lstrcmpiA
(
content_type
,
buf
);
}
/*************************************************************************
...
...
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