You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Added ml-patches patchset
Patches directly from the mailing list with second sign-off if supplied.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
From 6cd8711153dfad60cf2816d2f9f07189bd37719b Mon Sep 17 00:00:00 2001
|
||||
From ca172d5f44df90a62426572ef6f461b27bf57689 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Tue, 15 Nov 2016 13:02:13 +0800
|
||||
Subject: [PATCH] kernel32: MoveFile(source, source) should succeed.
|
||||
@ -11,7 +11,7 @@ Subject: [PATCH] kernel32: MoveFile(source, source) should succeed.
|
||||
4 files changed, 14 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c
|
||||
index 232ea7e..ba75b7e 100644
|
||||
index bde58e9..c7c5cbd 100644
|
||||
--- a/dlls/kernel32/path.c
|
||||
+++ b/dlls/kernel32/path.c
|
||||
@@ -1354,7 +1354,7 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest,
|
||||
@ -21,10 +21,10 @@ index 232ea7e..ba75b7e 100644
|
||||
- HANDLE source_handle = 0, dest_handle;
|
||||
+ HANDLE source_handle = 0, dest_handle = 0;
|
||||
ANSI_STRING source_unix, dest_unix;
|
||||
DWORD options;
|
||||
|
||||
TRACE("(%s,%s,%p,%p,%04x)\n",
|
||||
@@ -1413,18 +1413,22 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest,
|
||||
FILE_NON_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT );
|
||||
@@ -1414,18 +1414,22 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest,
|
||||
status = NtOpenFile( &dest_handle, GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, &attr, &io, 0, options );
|
||||
if (status == STATUS_SUCCESS) /* destination exists */
|
||||
{
|
||||
- NtClose( dest_handle );
|
||||
@ -50,7 +50,7 @@ index 232ea7e..ba75b7e 100644
|
||||
}
|
||||
else if (status != STATUS_OBJECT_NAME_NOT_FOUND)
|
||||
{
|
||||
@@ -1484,6 +1488,7 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest,
|
||||
@@ -1485,6 +1489,7 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest,
|
||||
|
||||
error:
|
||||
if (source_handle) NtClose( source_handle );
|
||||
@ -59,7 +59,7 @@ index 232ea7e..ba75b7e 100644
|
||||
RtlFreeAnsiString( &dest_unix );
|
||||
return FALSE;
|
||||
diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c
|
||||
index e201f62..e152cf1 100644
|
||||
index ef4eebc..07b3ffb 100644
|
||||
--- a/dlls/kernel32/tests/file.c
|
||||
+++ b/dlls/kernel32/tests/file.c
|
||||
@@ -1886,7 +1886,7 @@ static void test_MoveFileA(void)
|
||||
@ -72,10 +72,10 @@ index e201f62..e152cf1 100644
|
||||
ret = MoveFileA(source, dest);
|
||||
ok(!ret && GetLastError() == ERROR_ALREADY_EXISTS,
|
||||
diff --git a/dlls/msvcp120/tests/msvcp120.c b/dlls/msvcp120/tests/msvcp120.c
|
||||
index 969902d..d6051b0 100644
|
||||
index db9517d..7275e28 100644
|
||||
--- a/dlls/msvcp120/tests/msvcp120.c
|
||||
+++ b/dlls/msvcp120/tests/msvcp120.c
|
||||
@@ -1402,7 +1402,7 @@ static void test_tr2_sys__Rename(void)
|
||||
@@ -1524,7 +1524,7 @@ static void test_tr2_sys__Rename(void)
|
||||
CloseHandle(file);
|
||||
|
||||
ret = p_tr2_sys__Rename("tr2_test_dir\\f1", "tr2_test_dir\\f1");
|
||||
@ -85,10 +85,10 @@ index 969902d..d6051b0 100644
|
||||
errno = 0xdeadbeef;
|
||||
if(tests[i].val == ERROR_SUCCESS) {
|
||||
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp
|
||||
index dcc9629..e16f9f3 100644
|
||||
index ea4157c..298c4e9 100644
|
||||
--- a/programs/cmd/tests/test_builtins.cmd.exp
|
||||
+++ b/programs/cmd/tests/test_builtins.cmd.exp
|
||||
@@ -1261,8 +1261,8 @@ file move succeeded
|
||||
@@ -1295,8 +1295,8 @@ file move succeeded
|
||||
@todo_wine@bar@or_broken@baz
|
||||
read-only files are moveable
|
||||
file moved in subdirectory
|
||||
|
@ -1,8 +1,8 @@
|
||||
From 96e7b57c5591087cfd07b0658ac33a1ec6bde3b5 Mon Sep 17 00:00:00 2001
|
||||
From 6e5c9277d35def4b312820f11ef8a7586f788124 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Tue, 15 Nov 2016 13:32:42 +0800
|
||||
Subject: kernel32: MoveFile should make sure that it has the delete access to
|
||||
the source file.
|
||||
Subject: [PATCH] kernel32: MoveFile should make sure that it has the delete
|
||||
access to the source file.
|
||||
|
||||
---
|
||||
dlls/kernel32/path.c | 6 ++++--
|
||||
@ -10,10 +10,10 @@ Subject: kernel32: MoveFile should make sure that it has the delete access to
|
||||
2 files changed, 12 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c
|
||||
index f554d14..d7fc20e 100644
|
||||
index c7c5cbd..855330b 100644
|
||||
--- a/dlls/kernel32/path.c
|
||||
+++ b/dlls/kernel32/path.c
|
||||
@@ -1338,7 +1338,8 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest,
|
||||
@@ -1383,7 +1383,8 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest,
|
||||
attr.SecurityDescriptor = NULL;
|
||||
attr.SecurityQualityOfService = NULL;
|
||||
|
||||
@ -23,21 +23,21 @@ index f554d14..d7fc20e 100644
|
||||
if (status == STATUS_SUCCESS)
|
||||
status = wine_nt_to_unix_file_name( &nt_name, &source_unix, FILE_OPEN, FALSE );
|
||||
RtlFreeUnicodeString( &nt_name );
|
||||
@@ -1362,7 +1363,8 @@ 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,
|
||||
+ status = NtOpenFile( &dest_handle, GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, &attr, &io,
|
||||
+ FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
|
||||
FILE_NON_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT );
|
||||
@@ -1411,7 +1412,8 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest,
|
||||
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 );
|
||||
+ status = NtOpenFile( &dest_handle, GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, &attr, &io,
|
||||
+ FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, options );
|
||||
if (status == STATUS_SUCCESS) /* destination exists */
|
||||
{
|
||||
if (!(flag & MOVEFILE_REPLACE_EXISTING))
|
||||
diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c
|
||||
index f0f9232..6fcf019 100644
|
||||
index 07b3ffb..4729e75 100644
|
||||
--- a/dlls/kernel32/tests/file.c
|
||||
+++ b/dlls/kernel32/tests/file.c
|
||||
@@ -1905,12 +1905,10 @@ static void test_MoveFileA(void)
|
||||
@@ -1906,12 +1906,10 @@ static void test_MoveFileA(void)
|
||||
ok(hmapfile != NULL, "CreateFileMapping: error %d\n", GetLastError());
|
||||
|
||||
ret = MoveFileA(source, dest);
|
||||
@ -54,7 +54,7 @@ index f0f9232..6fcf019 100644
|
||||
|
||||
CloseHandle(hmapfile);
|
||||
CloseHandle(hfile);
|
||||
@@ -1925,12 +1923,10 @@ static void test_MoveFileA(void)
|
||||
@@ -1926,12 +1924,10 @@ static void test_MoveFileA(void)
|
||||
ok(hmapfile != NULL, "CreateFileMapping: error %d\n", GetLastError());
|
||||
|
||||
ret = MoveFileA(source, dest);
|
||||
@ -72,5 +72,5 @@ index f0f9232..6fcf019 100644
|
||||
CloseHandle(hmapfile);
|
||||
CloseHandle(hfile);
|
||||
--
|
||||
2.9.0
|
||||
1.9.1
|
||||
|
||||
|
Reference in New Issue
Block a user