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
adfb0428
Commit
adfb0428
authored
Apr 03, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Apr 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Create the backup in the same directory.
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9f604136
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
file.c
dlls/kernel32/file.c
+4
-2
No files found.
dlls/kernel32/file.c
View file @
adfb0428
...
...
@@ -43,6 +43,7 @@
#include "ddk/ntddk.h"
#include "kernel_private.h"
#include "fileapi.h"
#include "shlwapi.h"
#include "wine/exception.h"
#include "wine/unicode.h"
...
...
@@ -502,8 +503,9 @@ BOOL WINAPI ReplaceFileW(LPCWSTR lpReplacedFileName, LPCWSTR lpReplacementFileNa
static
const
WCHAR
prefixW
[]
=
{
'r'
,
'f'
,
0
};
WCHAR
temp_path
[
MAX_PATH
],
temp_file
[
MAX_PATH
];
if
(
!
GetTempPathW
(
ARRAY_SIZE
(
temp_path
),
temp_path
)
||
!
GetTempFileNameW
(
temp_path
,
prefixW
,
0
,
temp_file
)
lstrcpynW
(
temp_path
,
lpReplacedFileName
,
ARRAY_SIZE
(
temp_path
)
);
PathRemoveFileSpecW
(
temp_path
);
if
(
!
GetTempFileNameW
(
temp_path
,
prefixW
,
0
,
temp_file
)
||
!
MoveFileExW
(
lpReplacedFileName
,
temp_file
,
MOVEFILE_REPLACE_EXISTING
))
return
FALSE
;
...
...
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