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
b81f1ce5
Commit
b81f1ce5
authored
Nov 07, 2006
by
James Hawkins
Committed by
Alexandre Julliard
Nov 08, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Use the media_info structure instead of passing in individual values to extract_cabinet_file.
parent
84f34ec2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
15 deletions
+14
-15
files.c
dlls/msi/files.c
+14
-15
No files found.
dlls/msi/files.c
View file @
b81f1ce5
...
...
@@ -57,6 +57,14 @@ extern const WCHAR szRemoveFiles[];
static
const
WCHAR
cszTempFolder
[]
=
{
'T'
,
'e'
,
'm'
,
'p'
,
'F'
,
'o'
,
'l'
,
'd'
,
'e'
,
'r'
,
0
};
struct
media_info
{
UINT
last_sequence
;
LPWSTR
last_volume
;
LPWSTR
last_path
;
DWORD
count
;
WCHAR
source
[
MAX_PATH
];
};
/*
* This is a helper function for handling embedded cabinet media
*/
...
...
@@ -272,8 +280,7 @@ static INT_PTR cabinet_notify(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin)
*
* Extract files from a cab file.
*/
static
BOOL
extract_cabinet_file
(
MSIPACKAGE
*
package
,
LPCWSTR
source
,
LPCWSTR
path
)
static
BOOL
extract_cabinet_file
(
MSIPACKAGE
*
package
,
struct
media_info
*
mi
)
{
HFDI
hfdi
;
ERF
erf
;
...
...
@@ -283,7 +290,7 @@ static BOOL extract_cabinet_file(MSIPACKAGE* package, LPCWSTR source,
static
CHAR
empty
[]
=
""
;
CabData
data
;
TRACE
(
"Extracting %s to %s
\n
"
,
debugstr_w
(
source
),
debugstr_w
(
path
));
TRACE
(
"Extracting %s to %s
\n
"
,
debugstr_w
(
mi
->
source
),
debugstr_w
(
mi
->
last_
path
));
hfdi
=
FDICreate
(
cabinet_alloc
,
cabinet_free
,
...
...
@@ -300,12 +307,12 @@ static BOOL extract_cabinet_file(MSIPACKAGE* package, LPCWSTR source,
return
FALSE
;
}
if
(
!
(
cabinet
=
strdupWtoA
(
source
)))
if
(
!
(
cabinet
=
strdupWtoA
(
mi
->
source
)))
{
FDIDestroy
(
hfdi
);
return
FALSE
;
}
if
(
!
(
cab_path
=
strdupWtoA
(
path
)))
if
(
!
(
cab_path
=
strdupWtoA
(
mi
->
last_
path
)))
{
FDIDestroy
(
hfdi
);
msi_free
(
cabinet
);
...
...
@@ -348,14 +355,6 @@ static VOID set_file_source(MSIPACKAGE* package, MSIFILE* file, MSICOMPONENT*
file
->
SourcePath
=
build_directory_name
(
2
,
path
,
file
->
File
);
}
struct
media_info
{
UINT
last_sequence
;
LPWSTR
last_volume
;
LPWSTR
last_path
;
DWORD
count
;
WCHAR
source
[
MAX_PATH
];
};
static
struct
media_info
*
create_media_info
(
void
)
{
struct
media_info
*
mi
;
...
...
@@ -422,7 +421,7 @@ static UINT msi_extract_remote_cabinet( MSIPACKAGE *package, struct media_info *
}
msi_free
(
cabpath
);
return
!
extract_cabinet_file
(
package
,
mi
->
source
,
mi
->
last_path
);
return
!
extract_cabinet_file
(
package
,
mi
);
}
static
UINT
msi_change_media
(
MSIPACKAGE
*
package
,
struct
media_info
*
mi
,
LPCWSTR
prompt
)
...
...
@@ -578,7 +577,7 @@ static UINT ready_media_for_file( MSIPACKAGE *package, struct media_info *mi,
}
else
{
rc
=
!
extract_cabinet_file
(
package
,
mi
->
source
,
mi
->
last_path
);
rc
=
!
extract_cabinet_file
(
package
,
mi
);
}
}
else
...
...
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