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
89a8cfdb
Commit
89a8cfdb
authored
Jun 23, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Jun 25, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Don't overwrite a file that has a greater or equal version to the source file.
parent
1e942d6b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
18 deletions
+25
-18
files.c
dlls/msi/files.c
+25
-18
No files found.
dlls/msi/files.c
View file @
89a8cfdb
...
...
@@ -459,6 +459,24 @@ done:
return
ret
;
}
/* compares the version of a file read from the filesystem and
* the version specified in the File table
*/
static
int
msi_compare_file_version
(
MSIFILE
*
file
)
{
WCHAR
version
[
MAX_PATH
];
DWORD
size
;
UINT
r
;
size
=
MAX_PATH
;
version
[
0
]
=
'\0'
;
r
=
MsiGetFileVersionW
(
file
->
TargetPath
,
version
,
&
size
,
NULL
,
NULL
);
if
(
r
!=
ERROR_SUCCESS
)
return
0
;
return
lstrcmpW
(
version
,
file
->
Version
);
}
void
msi_free_media_info
(
MSIMEDIAINFO
*
mi
)
{
msi_free
(
mi
->
disk_prompt
);
...
...
@@ -802,6 +820,13 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
continue
;
}
if
(
MsiGetFileVersionW
(
file
->
TargetPath
,
NULL
,
NULL
,
NULL
,
NULL
)
==
ERROR_SUCCESS
&&
msi_compare_file_version
(
file
)
>=
0
)
{
TRACE
(
"Destination file version greater, not overwriting
\n
"
);
continue
;
}
if
(
file
->
Sequence
>
mi
->
last_sequence
||
mi
->
is_continuous
||
(
file
->
IsCompressed
&&
!
mi
->
is_extracted
))
{
...
...
@@ -972,24 +997,6 @@ UINT ACTION_DuplicateFiles(MSIPACKAGE *package)
return
rc
;
}
/* compares the version of a file read from the filesystem and
* the version specified in the File table
*/
static
int
msi_compare_file_version
(
MSIFILE
*
file
)
{
WCHAR
version
[
MAX_PATH
];
DWORD
size
;
UINT
r
;
size
=
MAX_PATH
;
version
[
0
]
=
'\0'
;
r
=
MsiGetFileVersionW
(
file
->
TargetPath
,
version
,
&
size
,
NULL
,
NULL
);
if
(
r
!=
ERROR_SUCCESS
)
return
0
;
return
lstrcmpW
(
version
,
file
->
Version
);
}
UINT
ACTION_RemoveFiles
(
MSIPACKAGE
*
package
)
{
MSIFILE
*
file
;
...
...
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