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
77e0ee90
Commit
77e0ee90
authored
Jun 02, 2009
by
Damjan Jovanovic
Committed by
Alexandre Julliard
Jun 03, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemenubuilder: Ignore wine.desktop managed file types.
parent
9339be64
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
winemenubuilder.c
programs/winemenubuilder/winemenubuilder.c
+15
-1
No files found.
programs/winemenubuilder/winemenubuilder.c
View file @
77e0ee90
...
...
@@ -1549,6 +1549,20 @@ static BOOL write_freedesktop_mime_type_entry(const char *packages_dir, const ch
return
ret
;
}
static
BOOL
is_extension_blacklisted
(
LPCWSTR
extension
)
{
/* These are managed through external tools like wine.desktop, to evade malware created file type associations */
static
const
WCHAR
comW
[]
=
{
'.'
,
'c'
,
'o'
,
'm'
,
0
};
static
const
WCHAR
exeW
[]
=
{
'.'
,
'e'
,
'x'
,
'e'
,
0
};
static
const
WCHAR
msiW
[]
=
{
'.'
,
'm'
,
's'
,
'i'
,
0
};
if
(
!
strcmpiW
(
extension
,
comW
)
||
!
strcmpiW
(
extension
,
exeW
)
||
!
strcmpiW
(
extension
,
msiW
))
return
TRUE
;
return
FALSE
;
}
static
BOOL
generate_associations
(
const
char
*
xdg_data_home
,
const
char
*
packages_dir
,
const
char
*
applications_dir
)
{
struct
list
*
nativeMimeTypes
=
NULL
;
...
...
@@ -1581,7 +1595,7 @@ static BOOL generate_associations(const char *xdg_data_home, const char *package
size
*=
2
;
}
while
(
ret
==
ERROR_MORE_DATA
);
if
(
ret
==
ERROR_SUCCESS
&&
extensionW
[
0
]
==
'.'
)
if
(
ret
==
ERROR_SUCCESS
&&
extensionW
[
0
]
==
'.'
&&
!
is_extension_blacklisted
(
extensionW
)
)
{
char
*
extensionA
=
NULL
;
WCHAR
*
commandW
=
NULL
;
...
...
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