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
fe8c3f90
Commit
fe8c3f90
authored
Apr 25, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Apr 28, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cabinet: Revert "cabinet: Fix for FDICopy with an empty cabinet file.".
This reverts commit
33e561f5
. Fixed the test that fails on all platforms.
parent
f2189d17
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
18 deletions
+18
-18
fdi.c
dlls/cabinet/fdi.c
+9
-16
fdi.c
dlls/cabinet/tests/fdi.c
+9
-2
No files found.
dlls/cabinet/fdi.c
View file @
fe8c3f90
...
...
@@ -562,14 +562,9 @@ static BOOL FDI_read_entries(
/* get the number of folders */
num_folders
=
EndGetI16
(
buf
+
cfhead_NumFolders
);
/* if num_folders is 0, it's correct cab, but empty */
/* if num_folders is 1, there is no folders in this cab */
/* get the number of files */
num_files
=
EndGetI16
(
buf
+
cfhead_NumFiles
);
if
(
num_files
&&
!
num_folders
)
{
/* If there at least one file in the cabinet. num_folders is always >= 1 */
WARN
(
"weird cabinet detect failure: cabinet is not empty, but num_folders = 0
\n
"
);
if
(
num_folders
==
0
)
{
/* PONDERME: is this really invalid? */
WARN
(
"weird cabinet detect failure: no folders in cabinet
\n
"
);
if
(
pmii
)
{
PFDI_INT
(
hfdi
)
->
perf
->
erfOper
=
FDIERROR_NOT_A_CABINET
;
PFDI_INT
(
hfdi
)
->
perf
->
erfType
=
0
;
...
...
@@ -577,9 +572,12 @@ static BOOL FDI_read_entries(
}
return
FALSE
;
}
if
(
!
num_files
&&
num_folders
)
{
/* If cabinet consist of 0 files, num_folders must be 0 */
WARN
(
"weird cabinet detect failure: no files in cabinet, but there are folders
\n
"
);
/* get the number of files */
num_files
=
EndGetI16
(
buf
+
cfhead_NumFiles
);
if
(
num_files
==
0
)
{
/* PONDERME: is this really invalid? */
WARN
(
"weird cabinet detect failure: no files in cabinet
\n
"
);
if
(
pmii
)
{
PFDI_INT
(
hfdi
)
->
perf
->
erfOper
=
FDIERROR_NOT_A_CABINET
;
PFDI_INT
(
hfdi
)
->
perf
->
erfType
=
0
;
...
...
@@ -2836,11 +2834,6 @@ BOOL __cdecl FDICopy(
}
/* free decompression temps */
if
(
!
fol
)
{
/* Empty cabinet */
PFDI_CLOSE
(
hfdi
,
cabhf
);
return
TRUE
;
/* empty, but correct */
}
switch
(
fol
->
comp_type
&
cffoldCOMPTYPE_MASK
)
{
case
cffoldCOMPTYPE_LZX
:
if
(
LZX
(
window
))
{
...
...
dlls/cabinet/tests/fdi.c
View file @
fe8c3f90
...
...
@@ -626,8 +626,15 @@ static void test_FDICopy(void)
fdi_write
,
fdi_close
,
fdi_seek
,
cpuUNKNOWN
,
&
erf
);
ret
=
FDICopy
(
hfdi
,
name
,
path
,
0
,
CopyProgress
,
NULL
,
0
);
ok
(
ret
,
"Expected FDICopy to succeed
\n
"
);
/* cabinet with no files or folders */
SetLastError
(
0xdeadbeef
);
ret
=
FDICopy
(
hfdi
,
name
,
path
,
0
,
CopyProgress
,
NULL
,
0
);
ok
(
ret
==
FALSE
,
"Expected FALSE, got %d
\n
"
,
ret
);
todo_wine
{
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"Expected ERROR_INVALID_HANDLE, got %d
\n
"
,
GetLastError
());
}
FDIDestroy
(
hfdi
);
DeleteFileA
(
name
);
...
...
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