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
bb747e4f
Commit
bb747e4f
authored
Nov 15, 2007
by
James Hawkins
Committed by
Alexandre Julliard
Nov 15, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Simplify ready_media.
parent
a97d6556
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
28 deletions
+26
-28
files.c
dlls/msi/files.c
+26
-28
No files found.
dlls/msi/files.c
View file @
bb747e4f
...
...
@@ -596,9 +596,7 @@ static UINT load_media_info(MSIPACKAGE *package, MSIFILE *file, struct media_inf
static
UINT
ready_media
(
MSIPACKAGE
*
package
,
MSIFILE
*
file
,
struct
media_info
*
mi
)
{
UINT
rc
=
ERROR_SUCCESS
,
type
;
BOOL
found
=
TRUE
;
LPWSTR
source_dir
;
UINT
rc
=
ERROR_SUCCESS
;
/* media info for continuous cabinet is already loaded */
if
(
mi
->
is_continuous
)
...
...
@@ -611,41 +609,41 @@ static UINT ready_media(MSIPACKAGE *package, MSIFILE *file, struct media_info *m
return
ERROR_FUNCTION_FAILED
;
}
if
(
mi
->
volume_label
&&
mi
->
disk_id
>
1
)
/* package should be downloaded */
if
(
file
->
IsCompressed
&&
GetFileAttributesW
(
mi
->
source
)
==
INVALID_FILE_ATTRIBUTES
&&
package
->
BaseURL
&&
UrlIsW
(
package
->
BaseURL
,
URLIS_URL
))
{
source_dir
=
msi_dup_property
(
package
,
cszSourceDir
);
PathStripToRootW
(
source_dir
);
type
=
GetDriveTypeW
(
source_dir
);
if
(
type
==
DRIVE_CDROM
||
type
==
DRIVE_REMOVABLE
)
found
=
source_matches_volume
(
mi
,
source_dir
);
if
(
!
found
)
found
=
GetFileAttributesW
(
mi
->
cabinet
)
!=
INVALID_FILE_ATTRIBUTES
;
msi_free
(
source_dir
);
return
download_remote_cabinet
(
package
,
mi
);
}
if
(
file
->
IsCompressed
&&
GetFileAttributesW
(
mi
->
source
)
==
INVALID_FILE_ATTRIBUTES
)
/* check volume matches, change media if not */
if
(
mi
->
volume_label
&&
mi
->
disk_id
>
1
)
{
found
=
FALSE
;
LPWSTR
source
=
msi_dup_property
(
package
,
cszSourceDir
);
BOOL
matches
;
UINT
type
;
if
(
package
->
BaseURL
&&
UrlIsW
(
package
->
BaseURL
,
URLIS_URL
))
PathStripToRootW
(
source
);
type
=
GetDriveTypeW
(
source
);
matches
=
source_matches_volume
(
mi
,
source
);
msi_free
(
source
);
if
((
type
==
DRIVE_CDROM
||
type
==
DRIVE_REMOVABLE
)
&&
!
matches
)
{
rc
=
download_remote_cabinet
(
package
,
mi
);
if
(
rc
==
ERROR_SUCCESS
&&
GetFileAttributesW
(
mi
->
source
)
!=
INVALID_FILE_ATTRIBUTES
)
{
found
=
TRUE
;
}
rc
=
msi_change_media
(
package
,
mi
);
if
(
rc
!=
ERROR_SUCCESS
)
return
rc
;
}
}
if
(
!
found
)
rc
=
msi_change_media
(
package
,
mi
);
if
(
mi
->
cabinet
&&
GetFileAttributesW
(
mi
->
cabinet
)
==
INVALID_FILE_ATTRIBUTES
)
{
ERR
(
"Cabinet not found: %s
\n
"
,
debugstr_w
(
mi
->
cabinet
));
return
ERROR_INSTALL_FAILURE
;
}
return
rc
;
return
ERROR_SUCCESS
;
}
static
UINT
get_file_target
(
MSIPACKAGE
*
package
,
LPCWSTR
file_key
,
...
...
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