diff --git a/patches/kernel32-CopyFileEx/0001-kernel32-Add-support-for-progress-callback-in-CopyFi.patch b/patches/kernel32-CopyFileEx/0001-kernel32-Add-support-for-progress-callback-in-CopyFi.patch index dea2089e..2f308f4a 100644 --- a/patches/kernel32-CopyFileEx/0001-kernel32-Add-support-for-progress-callback-in-CopyFi.patch +++ b/patches/kernel32-CopyFileEx/0001-kernel32-Add-support-for-progress-callback-in-CopyFi.patch @@ -1,18 +1,18 @@ -From 519a979a6d7c304c65f198b64495f4fd36482fbc Mon Sep 17 00:00:00 2001 +From 8b435d44bcbeb2e6fd1ef37c8a23405dea88b685 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Thu, 26 Feb 2015 06:41:26 +0100 Subject: [PATCH] kernelbase: Add support for progress callback in CopyFileEx. --- - dlls/kernel32/tests/file.c | 6 --- - dlls/kernelbase/file.c | 77 +++++++++++++++++++++++++++++++++++--- - 2 files changed, 71 insertions(+), 12 deletions(-) + dlls/kernel32/tests/file.c | 6 ---- + dlls/kernelbase/file.c | 72 ++++++++++++++++++++++++++++++++++---- + 2 files changed, 66 insertions(+), 12 deletions(-) diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c -index 77174d43d5b..4bd9f790cc0 100644 +index 1c4cdfea1b4..0d0e6a893c9 100644 --- a/dlls/kernel32/tests/file.c +++ b/dlls/kernel32/tests/file.c -@@ -1170,23 +1170,17 @@ static void test_CopyFileEx(void) +@@ -1169,23 +1169,17 @@ static void test_CopyFileEx(void) ok(hfile != INVALID_HANDLE_VALUE, "failed to open destination file, error %ld\n", GetLastError()); SetLastError(0xdeadbeef); retok = CopyFileExA(source, dest, copy_progress_cb, hfile, NULL, 0); @@ -37,7 +37,7 @@ index 77174d43d5b..4bd9f790cc0 100644 retok = CopyFileExA(source, NULL, copy_progress_cb, hfile, NULL, 0); diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c -index 02c2e841f85..cabbe2d17c1 100644 +index 7b1858de424..a98a54ae9b1 100644 --- a/dlls/kernelbase/file.c +++ b/dlls/kernelbase/file.c @@ -500,11 +500,16 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT @@ -58,16 +58,11 @@ index 02c2e841f85..cabbe2d17c1 100644 if (!source || !dest) { -@@ -519,7 +524,15 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT - - TRACE("%s -> %s, %lx\n", debugstr_w(source), debugstr_w(dest), flags); +@@ -526,7 +531,10 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT + if (flags & COPY_FILE_OPEN_SOURCE_FOR_WRITE) + FIXME("COPY_FILE_OPEN_SOURCE_FOR_WRITE is not supported\n"); - if ((h1 = CreateFileW( source, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, -+ if (flags & COPY_FILE_RESTARTABLE) -+ FIXME("COPY_FILE_RESTARTABLE is not supported\n"); -+ if (flags & COPY_FILE_COPY_SYMLINK) -+ FIXME("COPY_FILE_COPY_SYMLINK is not supported\n"); -+ + if (flags & COPY_FILE_OPEN_SOURCE_FOR_WRITE) + source_access |= GENERIC_WRITE; + @@ -75,7 +70,7 @@ index 02c2e841f85..cabbe2d17c1 100644 NULL, OPEN_EXISTING, 0, 0 )) == INVALID_HANDLE_VALUE) { WARN("Unable to open source %s\n", debugstr_w(source)); -@@ -527,7 +540,7 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT +@@ -534,7 +542,7 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT return FALSE; } @@ -84,7 +79,7 @@ index 02c2e841f85..cabbe2d17c1 100644 { WARN("GetFileInformationByHandle returned error for %s\n", debugstr_w(source)); HeapFree( GetProcessHeap(), 0, buffer ); -@@ -553,7 +566,11 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT +@@ -560,7 +568,11 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT } } @@ -97,7 +92,7 @@ index 02c2e841f85..cabbe2d17c1 100644 (flags & COPY_FILE_FAIL_IF_EXISTS) ? CREATE_NEW : CREATE_ALWAYS, info.FileAttributes, h1 )) == INVALID_HANDLE_VALUE) { -@@ -563,6 +580,29 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT +@@ -570,6 +582,29 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT return FALSE; } @@ -127,7 +122,7 @@ index 02c2e841f85..cabbe2d17c1 100644 while (ReadFile( h1, buffer, buffer_size, &count, NULL ) && count) { char *p = buffer; -@@ -572,13 +612,38 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT +@@ -579,13 +614,38 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT if (!WriteFile( h2, p, count, &res, NULL ) || !res) goto done; p += res; count -= res; @@ -169,5 +164,5 @@ index 02c2e841f85..cabbe2d17c1 100644 CloseHandle( h1 ); CloseHandle( h2 ); -- -2.34.1 +2.35.1 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 14574cea..bfbfea26 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -51,7 +51,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "429325b6891bbb7488b3e8d8f97e4abb92879ce7" + echo "aa2851f167aa2089fdbb12ec58d6f6b4801edbab" } # Show version information diff --git a/staging/upstream-commit b/staging/upstream-commit index 1c0f6279..60194773 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -429325b6891bbb7488b3e8d8f97e4abb92879ce7 +aa2851f167aa2089fdbb12ec58d6f6b4801edbab