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
a79765ff
Commit
a79765ff
authored
Dec 15, 2006
by
James Hawkins
Committed by
Alexandre Julliard
Dec 15, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cabinet: Close the opened file handle even in error cases.
parent
7f31cc47
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
22 deletions
+11
-22
fdi.c
dlls/cabinet/fdi.c
+11
-22
No files found.
dlls/cabinet/fdi.c
View file @
a79765ff
...
...
@@ -2809,6 +2809,17 @@ BOOL __cdecl FDICopy(
err
=
fdi_decomp
(
file
,
1
,
decomp_state
,
pszCabPath
,
pfnfdin
,
pvUser
);
if
(
err
)
CAB
(
current
)
=
NULL
;
else
CAB
(
offset
)
+=
file
->
length
;
/* fdintCLOSE_FILE_INFO notification */
ZeroMemory
(
&
fdin
,
sizeof
(
FDINOTIFICATION
));
fdin
.
pv
=
pvUser
;
fdin
.
psz1
=
(
char
*
)
file
->
filename
;
fdin
.
hf
=
filehf
;
fdin
.
cb
=
(
file
->
attribs
&
cffile_A_EXEC
)
?
TRUE
:
FALSE
;
/* FIXME: is that right? */
fdin
.
date
=
file
->
date
;
fdin
.
time
=
file
->
time
;
fdin
.
attribs
=
file
->
attribs
;
/* FIXME: filter _A_EXEC? */
((
*
pfnfdin
)(
fdintCLOSE_FILE_INFO
,
&
fdin
));
switch
(
err
)
{
case
DECR_OK
:
break
;
...
...
@@ -2829,28 +2840,6 @@ BOOL __cdecl FDICopy(
PFDI_INT
(
hfdi
)
->
perf
->
fError
=
TRUE
;
goto
bail_and_fail
;
}
/* fdintCLOSE_FILE_INFO notification */
ZeroMemory
(
&
fdin
,
sizeof
(
FDINOTIFICATION
));
fdin
.
pv
=
pvUser
;
fdin
.
psz1
=
(
char
*
)
file
->
filename
;
fdin
.
hf
=
filehf
;
fdin
.
cb
=
(
file
->
attribs
&
cffile_A_EXEC
)
?
TRUE
:
FALSE
;
/* FIXME: is that right? */
fdin
.
date
=
file
->
date
;
fdin
.
time
=
file
->
time
;
fdin
.
attribs
=
file
->
attribs
;
/* FIXME: filter _A_EXEC? */
err
=
((
*
pfnfdin
)(
fdintCLOSE_FILE_INFO
,
&
fdin
));
if
(
err
==
FALSE
||
err
==
-
1
)
{
/*
* SDK states that even though they indicated failure,
* we are not supposed to try and close the file, so we
* just treat this like all the others
*/
PFDI_INT
(
hfdi
)
->
perf
->
erfOper
=
FDIERROR_USER_ABORT
;
PFDI_INT
(
hfdi
)
->
perf
->
erfType
=
0
;
PFDI_INT
(
hfdi
)
->
perf
->
fError
=
TRUE
;
goto
bail_and_fail
;
}
}
}
...
...
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