Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
03afdb02
Commit
03afdb02
authored
Apr 21, 2009
by
Nicolas Le Cam
Committed by
Alexandre Julliard
Apr 23, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Enfore use of GetFileAttributes return value.
parent
11cb788f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
appsearch.c
dlls/msi/appsearch.c
+10
-5
No files found.
dlls/msi/appsearch.c
View file @
03afdb02
...
...
@@ -178,7 +178,8 @@ static LPWSTR app_search_file(LPWSTR path, MSISIGNATURE *sig)
}
attr
=
GetFileAttributesW
(
path
);
if
(
attr
==
INVALID_FILE_ATTRIBUTES
||
attr
==
FILE_ATTRIBUTE_DIRECTORY
)
if
(
attr
==
INVALID_FILE_ATTRIBUTES
||
(
attr
&
FILE_ATTRIBUTE_DIRECTORY
))
return
NULL
;
size
=
GetFileVersionInfoSizeW
(
path
,
&
handle
);
...
...
@@ -298,7 +299,8 @@ static UINT ACTION_AppSearchComponents(MSIPACKAGE *package, LPWSTR *appValue, MS
lstrcatW
(
path
,
MSI_RecordGetString
(
rec
,
2
));
attr
=
GetFileAttributesW
(
path
);
if
(
attr
!=
INVALID_FILE_ATTRIBUTES
&&
attr
!=
FILE_ATTRIBUTE_DIRECTORY
)
if
(
attr
!=
INVALID_FILE_ATTRIBUTES
&&
!
(
attr
&
FILE_ATTRIBUTE_DIRECTORY
))
*
appValue
=
strdupW
(
path
);
}
...
...
@@ -901,7 +903,8 @@ static UINT ACTION_SearchDirectory(MSIPACKAGE *package, MSISIGNATURE *sig,
}
attr
=
GetFileAttributesW
(
val
);
if
((
attr
&
FILE_ATTRIBUTE_DIRECTORY
)
&&
if
(
attr
!=
INVALID_FILE_ATTRIBUTES
&&
(
attr
&
FILE_ATTRIBUTE_DIRECTORY
)
&&
val
&&
val
[
lstrlenW
(
val
)
-
1
]
!=
'\\'
)
{
val
=
msi_realloc
(
val
,
(
lstrlenW
(
val
)
+
2
)
*
sizeof
(
WCHAR
));
...
...
@@ -933,7 +936,7 @@ static UINT ACTION_AppSearchDr(MSIPACKAGE *package, LPWSTR *appValue, MSISIGNATU
WCHAR
expanded
[
MAX_PATH
];
MSIRECORD
*
row
;
int
depth
;
DWORD
sz
;
DWORD
sz
,
attr
;
UINT
rc
;
TRACE
(
"%s
\n
"
,
debugstr_w
(
sig
->
Name
));
...
...
@@ -970,7 +973,9 @@ static UINT ACTION_AppSearchDr(MSIPACKAGE *package, LPWSTR *appValue, MSISIGNATU
if
(
parent
)
{
if
(
!
(
GetFileAttributesW
(
parent
)
&
FILE_ATTRIBUTE_DIRECTORY
))
attr
=
GetFileAttributesW
(
parent
);
if
(
attr
!=
INVALID_FILE_ATTRIBUTES
&&
!
(
attr
&
FILE_ATTRIBUTE_DIRECTORY
))
{
PathRemoveFileSpecW
(
parent
);
PathAddBackslashW
(
parent
);
...
...
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