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
97d2d9bf
Commit
97d2d9bf
authored
Aug 02, 2018
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Aug 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Add support for MOVEFILE_WRITE_THROUGH to MoveFile.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
88d52edc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
path.c
dlls/kernel32/path.c
+6
-5
No files found.
dlls/kernel32/path.c
View file @
97d2d9bf
...
...
@@ -1283,6 +1283,7 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest,
NTSTATUS
status
;
HANDLE
source_handle
=
0
,
dest_handle
;
ANSI_STRING
source_unix
,
dest_unix
;
DWORD
options
;
TRACE
(
"(%s,%s,%p,%p,%04x)
\n
"
,
debugstr_w
(
source
),
debugstr_w
(
dest
),
fnProgress
,
param
,
flag
);
...
...
@@ -1293,9 +1294,6 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest,
if
(
!
dest
)
return
DeleteFileW
(
source
);
if
(
flag
&
MOVEFILE_WRITE_THROUGH
)
FIXME
(
"MOVEFILE_WRITE_THROUGH unimplemented
\n
"
);
/* check if we are allowed to rename the source */
if
(
!
RtlDosPathNameToNtPathName_U
(
source
,
&
nt_name
,
NULL
,
NULL
))
...
...
@@ -1336,8 +1334,11 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest,
SetLastError
(
ERROR_PATH_NOT_FOUND
);
goto
error
;
}
status
=
NtOpenFile
(
&
dest_handle
,
GENERIC_READ
|
GENERIC_WRITE
|
SYNCHRONIZE
,
&
attr
,
&
io
,
0
,
FILE_NON_DIRECTORY_FILE
|
FILE_SYNCHRONOUS_IO_NONALERT
);
options
=
FILE_NON_DIRECTORY_FILE
|
FILE_SYNCHRONOUS_IO_NONALERT
;
if
(
flag
&
MOVEFILE_WRITE_THROUGH
)
options
|=
FILE_WRITE_THROUGH
;
status
=
NtOpenFile
(
&
dest_handle
,
GENERIC_READ
|
GENERIC_WRITE
|
SYNCHRONIZE
,
&
attr
,
&
io
,
0
,
options
);
if
(
status
==
STATUS_SUCCESS
)
/* destination exists */
{
NtClose
(
dest_handle
);
...
...
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