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
a58c6251
Commit
a58c6251
authored
Sep 27, 2022
by
Paul Gofman
Committed by
Alexandre Julliard
Sep 28, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Disable FS redirection for temporary file in cabinet_copy_file().
parent
1be02b2b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
3 deletions
+13
-3
files.c
dlls/msi/files.c
+9
-0
media.c
dlls/msi/media.c
+3
-3
msipriv.h
dlls/msi/msipriv.h
+1
-0
No files found.
dlls/msi/files.c
View file @
a58c6251
...
...
@@ -48,6 +48,15 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
msi
);
BOOL
msi_get_temp_file_name
(
MSIPACKAGE
*
package
,
const
WCHAR
*
tmp_path
,
const
WCHAR
*
prefix
,
WCHAR
*
tmp_filename
)
{
BOOL
ret
;
msi_disable_fs_redirection
(
package
);
ret
=
GetTempFileNameW
(
tmp_path
,
prefix
,
0
,
tmp_filename
);
msi_revert_fs_redirection
(
package
);
return
ret
;
}
HANDLE
msi_create_file
(
MSIPACKAGE
*
package
,
const
WCHAR
*
filename
,
DWORD
access
,
DWORD
sharing
,
DWORD
creation
,
DWORD
flags
)
{
...
...
dlls/msi/media.c
View file @
a58c6251
...
...
@@ -468,10 +468,10 @@ static INT_PTR cabinet_copy_file(FDINOTIFICATIONTYPE fdint,
msi_free
(
tmppathW
);
return
ERROR_OUTOFMEMORY
;
}
if
(
!
GetTempFileNameW
(
tmppathW
,
L"msi"
,
0
,
tmpfileW
))
tmpfileW
[
0
]
=
0
;
if
(
!
msi_get_temp_file_name
(
data
->
package
,
tmppathW
,
L"msi"
,
tmpfileW
))
tmpfileW
[
0
]
=
0
;
msi_free
(
tmppathW
);
handle
=
CreateFileW
(
tmpfileW
,
GENERIC_READ
|
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
attrs
,
NULL
);
handle
=
msi_create_file
(
data
->
package
,
tmpfileW
,
GENERIC_READ
|
GENERIC_WRITE
,
0
,
CREATE_ALWAYS
,
attrs
);
if
(
handle
!=
INVALID_HANDLE_VALUE
&&
msi_move_file
(
data
->
package
,
path
,
NULL
,
MOVEFILE_DELAY_UNTIL_REBOOT
)
&&
...
...
@@ -482,7 +482,7 @@ static INT_PTR cabinet_copy_file(FDINOTIFICATIONTYPE fdint,
else
{
WARN
(
"failed to schedule rename operation %s (error %lu)
\n
"
,
debugstr_w
(
path
),
GetLastError
()
);
DeleteFileW
(
tmpfileW
);
msi_delete_file
(
data
->
package
,
tmpfileW
);
}
msi_free
(
tmpfileW
);
}
...
...
dlls/msi/msipriv.h
View file @
a58c6251
...
...
@@ -1073,6 +1073,7 @@ static inline void msi_revert_fs_redirection( MSIPACKAGE *package )
{
if
(
is_wow64
&&
package
->
platform
==
PLATFORM_X64
)
Wow64RevertWow64FsRedirection
(
package
->
cookie
);
}
extern
BOOL
msi_get_temp_file_name
(
MSIPACKAGE
*
,
const
WCHAR
*
,
const
WCHAR
*
,
WCHAR
*
)
DECLSPEC_HIDDEN
;
extern
HANDLE
msi_create_file
(
MSIPACKAGE
*
,
const
WCHAR
*
,
DWORD
,
DWORD
,
DWORD
,
DWORD
)
DECLSPEC_HIDDEN
;
extern
BOOL
msi_delete_file
(
MSIPACKAGE
*
,
const
WCHAR
*
)
DECLSPEC_HIDDEN
;
extern
BOOL
msi_remove_directory
(
MSIPACKAGE
*
,
const
WCHAR
*
)
DECLSPEC_HIDDEN
;
...
...
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