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
b1bd9208
Commit
b1bd9208
authored
Aug 23, 2007
by
James Hawkins
Committed by
Alexandre Julliard
Aug 24, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cabinet: Append new file nodes to the front of the file list.
parent
80e149d6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
11 deletions
+21
-11
cabinet_main.c
dlls/cabinet/cabinet_main.c
+21
-11
extract.c
dlls/cabinet/tests/extract.c
+0
-0
No files found.
dlls/cabinet/cabinet_main.c
View file @
b1bd9208
...
...
@@ -163,12 +163,18 @@ static void fill_file_node(struct FILELIST *pNode, LPCSTR szFilename)
lstrcpyA
(
pNode
->
FileName
,
szFilename
);
}
static
BOOL
file_in_list
(
const
struct
FILELIST
*
pNode
,
LPCSTR
szFilename
)
static
BOOL
file_in_list
(
struct
FILELIST
*
pNode
,
LPCSTR
szFilename
,
struct
FILELIST
**
pOut
)
{
while
(
pNode
)
{
if
(
!
lstrcmpiA
(
pNode
->
FileName
,
szFilename
))
{
if
(
pOut
)
*
pOut
=
pNode
;
return
TRUE
;
}
pNode
=
pNode
->
next
;
}
...
...
@@ -182,7 +188,7 @@ static INT_PTR fdi_notify_extract(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pf
{
case
fdintCOPY_FILE
:
{
struct
FILELIST
*
*
fileList
;
struct
FILELIST
*
fileList
,
*
node
;
SESSION
*
pDestination
=
pfdin
->
pv
;
LPSTR
szFullPath
,
szDirectory
;
HANDLE
hFile
=
0
;
...
...
@@ -201,26 +207,26 @@ static INT_PTR fdi_notify_extract(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pf
szDirectory
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dwSize
);
lstrcpynA
(
szDirectory
,
szFullPath
,
dwSize
);
pDestination
->
FileSize
+=
pfdin
->
cb
;
if
(
pDestination
->
Operation
&
EXTRACT_FILLFILELIST
)
{
fileList
=
&
pDestination
->
FileList
;
while
(
*
fileList
)
fileList
=
&
((
*
fileList
)
->
next
);
*
fileList
=
HeapAlloc
(
GetProcessHeap
(),
0
,
fileList
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
struct
FILELIST
));
fill_file_node
(
*
fileList
,
pfdin
->
psz1
);
fill_file_node
(
fileList
,
pfdin
->
psz1
);
fileList
->
Extracted
=
TRUE
;
fileList
->
next
=
pDestination
->
FileList
;
pDestination
->
FileList
=
fileList
;
lstrcpyA
(
pDestination
->
CurrentFile
,
szFullPath
);
pDestination
->
FileCount
++
;
}
if
((
pDestination
->
Operation
&
EXTRACT_EXTRACTFILES
)
||
file_in_list
(
pDestination
->
FilterList
,
pfdin
->
psz1
))
file_in_list
(
pDestination
->
FilterList
,
pfdin
->
psz1
,
NULL
))
{
/* skip this file if it is not in the file list */
if
(
!
file_in_list
(
pDestination
->
FileList
,
pfdin
->
psz1
))
if
(
!
file_in_list
(
pDestination
->
FileList
,
pfdin
->
psz1
,
&
node
))
return
0
;
/* create the destination directory if it doesn't exist */
...
...
@@ -232,6 +238,8 @@ static INT_PTR fdi_notify_extract(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pf
if
(
hFile
==
INVALID_HANDLE_VALUE
)
hFile
=
0
;
else
node
->
Extracted
=
FALSE
;
}
HeapFree
(
GetProcessHeap
(),
0
,
szFullPath
);
...
...
@@ -345,6 +353,8 @@ HRESULT WINAPI Extract(SESSION *dest, LPCSTR szCabName)
path
=
NULL
;
}
dest
->
FileSize
=
0
;
if
(
!
FDICopy
(
hfdi
,
name
,
path
,
0
,
fdi_notify_extract
,
NULL
,
dest
))
res
=
E_FAIL
;
...
...
dlls/cabinet/tests/extract.c
View file @
b1bd9208
This diff is collapsed.
Click to expand it.
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