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
857398a9
Commit
857398a9
authored
Jul 30, 2003
by
Gregory M. Turner
Committed by
Alexandre Julliard
Jul 30, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- ERR("WARNING") just doesn't look right ;)
- treat zero file handle as invalid if the callback returns it - provide the same args as Windows to the Open callback
parent
533f0b5d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
3 deletions
+22
-3
cabinet.h
dlls/cabinet/cabinet.h
+4
-0
fdi.c
dlls/cabinet/fdi.c
+18
-3
No files found.
dlls/cabinet/cabinet.h
View file @
857398a9
...
...
@@ -24,6 +24,10 @@
#include "fdi.h"
#include "fci.h"
/* from msvcrt/sys/stat.h */
#define _S_IWRITE 0x0080
#define _S_IREAD 0x0100
#define CAB_SPLITMAX (10)
#define CAB_SEARCH_SIZE (32*1024)
...
...
dlls/cabinet/fdi.c
View file @
857398a9
...
...
@@ -39,7 +39,6 @@
#include "winbase.h"
#include "winerror.h"
#include "fdi.h"
#include "msvcrt/fcntl.h"
/* _O_.* */
#include "cabinet.h"
#include "wine/debug.h"
...
...
@@ -1825,7 +1824,7 @@ int fdi_decomp(struct fdi_file *fi, int savemode, fdi_decomp_state *decomp_state
TRACE
(
"full cab path/file name: %s
\n
"
,
debugstr_a
(
fullpath
));
/* try to get a handle to the cabfile */
cabhf
=
PFDI_OPEN
(
CAB
(
hfdi
),
fullpath
,
_O_BINARY
|
_O_RDONLY
|
_O_SEQUENTIAL
,
0
);
cabhf
=
PFDI_OPEN
(
CAB
(
hfdi
),
fullpath
,
32768
,
_S_IREAD
|
_S_IWRITE
);
if
(
cabhf
==
-
1
)
{
/* no file. allow the user to try again */
fdin
.
fdie
=
FDIERROR_CABINET_NOT_FOUND
;
...
...
@@ -1833,6 +1832,13 @@ int fdi_decomp(struct fdi_file *fi, int savemode, fdi_decomp_state *decomp_state
continue
;
}
if
(
cabhf
==
0
)
{
ERR
(
"PFDI_OPEN returned zero for %s.
\n
"
,
fullpath
);
fdin
.
fdie
=
FDIERROR_CABINET_NOT_FOUND
;
if
(((
*
pfnfdin
)(
fdintNEXT_CABINET
,
&
fdin
)))
return
DECR_USERABORT
;
continue
;
}
/* check if it's really a cabfile. Note that this doesn't implement the bug */
if
(
!
FDI_read_entries
(
CAB
(
hfdi
),
cabhf
,
&
fdici
,
&
(
cab
->
next
->
mii
)))
{
WARN
(
"FDIIsCabinet failed.
\n
"
);
...
...
@@ -2020,7 +2026,7 @@ BOOL __cdecl FDICopy(
TRACE
(
"full cab path/file name: %s
\n
"
,
debugstr_a
(
fullpath
));
/* get a handle to the cabfile */
cabhf
=
PFDI_OPEN
(
hfdi
,
fullpath
,
_O_BINARY
|
_O_RDONLY
|
_O_SEQUENTIAL
,
0
);
cabhf
=
PFDI_OPEN
(
hfdi
,
fullpath
,
32768
,
_S_IREAD
|
_S_IWRITE
);
if
(
cabhf
==
-
1
)
{
PFDI_INT
(
hfdi
)
->
perf
->
erfOper
=
FDIERROR_CABINET_NOT_FOUND
;
PFDI_INT
(
hfdi
)
->
perf
->
erfType
=
ERROR_FILE_NOT_FOUND
;
...
...
@@ -2029,6 +2035,15 @@ BOOL __cdecl FDICopy(
return
FALSE
;
}
if
(
cabhf
==
0
)
{
ERR
(
"PFDI_OPEN returned zero for %s.
\n
"
,
fullpath
);
PFDI_INT
(
hfdi
)
->
perf
->
erfOper
=
FDIERROR_CABINET_NOT_FOUND
;
PFDI_INT
(
hfdi
)
->
perf
->
erfType
=
ERROR_FILE_NOT_FOUND
;
PFDI_INT
(
hfdi
)
->
perf
->
fError
=
TRUE
;
SetLastError
(
ERROR_FILE_NOT_FOUND
);
return
FALSE
;
}
/* check if it's really a cabfile. Note that this doesn't implement the bug */
if
(
!
FDI_read_entries
(
hfdi
,
cabhf
,
&
fdici
,
&
(
CAB
(
mii
))))
{
ERR
(
"FDIIsCabinet failed.
\n
"
);
...
...
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