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
953359c7
Commit
953359c7
authored
Oct 16, 2013
by
Kohei Takahashi
Committed by
Alexandre Julliard
Oct 15, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Return -1 on open failure in FDI callbacks.
parent
63092712
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
media.c
dlls/msi/media.c
+4
-9
No files found.
dlls/msi/media.c
View file @
953359c7
...
...
@@ -137,7 +137,6 @@ static void CDECL cabinet_free(void *pv)
static
INT_PTR
CDECL
cabinet_open
(
char
*
pszFile
,
int
oflag
,
int
pmode
)
{
HANDLE
handle
;
DWORD
dwAccess
=
0
;
DWORD
dwShareMode
=
0
;
DWORD
dwCreateDisposition
=
OPEN_EXISTING
;
...
...
@@ -163,12 +162,8 @@ static INT_PTR CDECL cabinet_open(char *pszFile, int oflag, int pmode)
else
if
(
oflag
&
_O_CREAT
)
dwCreateDisposition
=
CREATE_ALWAYS
;
handle
=
CreateFileA
(
pszFile
,
dwAccess
,
dwShareMode
,
NULL
,
return
(
INT_PTR
)
CreateFileA
(
pszFile
,
dwAccess
,
dwShareMode
,
NULL
,
dwCreateDisposition
,
0
,
NULL
);
if
(
handle
==
INVALID_HANDLE_VALUE
)
return
0
;
return
(
INT_PTR
)
handle
;
}
static
UINT
CDECL
cabinet_read
(
INT_PTR
hf
,
void
*
pv
,
UINT
cb
)
...
...
@@ -225,12 +220,12 @@ static INT_PTR CDECL cabinet_open_stream( char *pszFile, int oflag, int pmode )
if
(
!
cab
)
{
WARN
(
"failed to get cabinet stream
\n
"
);
return
0
;
return
-
1
;
}
if
(
!
cab
->
stream
[
0
]
||
!
(
encoded
=
encode_streamname
(
FALSE
,
cab
->
stream
+
1
)))
{
WARN
(
"failed to encode stream name
\n
"
);
return
0
;
return
-
1
;
}
if
(
msi_clone_open_stream
(
package_disk
.
package
->
db
,
cab
->
storage
,
encoded
,
&
stream
)
!=
ERROR_SUCCESS
)
{
...
...
@@ -239,7 +234,7 @@ static INT_PTR CDECL cabinet_open_stream( char *pszFile, int oflag, int pmode )
{
WARN
(
"failed to open stream 0x%08x
\n
"
,
hr
);
msi_free
(
encoded
);
return
0
;
return
-
1
;
}
}
msi_free
(
encoded
);
...
...
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