Signed-off-by: Oded Elisha oded123456@gmail.com --- dlls/kernel32/path.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c index a389743..64e34b7 100644 --- a/dlls/kernel32/path.c +++ b/dlls/kernel32/path.c @@ -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; + BOOL should_sync = FALSE;
TRACE("(%s,%s,%p,%p,%04x)\n", debugstr_w(source), debugstr_w(dest), fnProgress, param, flag ); @@ -1293,8 +1294,9 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest, if (!dest) return DeleteFileW( source );
- if (flag & MOVEFILE_WRITE_THROUGH) - FIXME("MOVEFILE_WRITE_THROUGH unimplemented\n"); + if ((flag & MOVEFILE_WRITE_THROUGH) && !(flag & MOVEFILE_DELAY_UNTIL_REBOOT)) { + should_sync = TRUE; + }
/* check if we are allowed to rename the source */
@@ -1404,6 +1406,10 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest, } }
+ if (should_sync) { + sync(); + } + NtClose( source_handle ); RtlFreeAnsiString( &source_unix ); RtlFreeAnsiString( &dest_unix );