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
Rebase against ba9f3dc198dfc81bb40159077b73b797006bb73c
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
From 6cd8711153dfad60cf2816d2f9f07189bd37719b Mon Sep 17 00:00:00 2001
|
||||
From de4b7a3055065faed4cdc9ca253248eed5a3a7bb 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 bde58e9dc4..c7c5cbd3f7 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 ef4eebc31c..07b3ffb77b 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 d7b82a3aae..5141622d6a 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 ea4157c09d..298c4e9a9e 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
|
||||
@ -100,5 +100,5 @@ index dcc9629..e16f9f3 100644
|
||||
simple directory move succeeded
|
||||
moving a directory to itself gives error; errlevel 1
|
||||
--
|
||||
1.9.1
|
||||
2.18.0
|
||||
|
||||
|
@ -1,19 +1,19 @@
|
||||
From 96e7b57c5591087cfd07b0658ac33a1ec6bde3b5 Mon Sep 17 00:00:00 2001
|
||||
From 8031fda3ffc4d2469524f21198ef0aaf9725562e 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 ++++--
|
||||
dlls/kernel32/path.c | 4 ++--
|
||||
dlls/kernel32/tests/file.c | 20 ++++++++------------
|
||||
2 files changed, 12 insertions(+), 14 deletions(-)
|
||||
2 files changed, 10 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c
|
||||
index f554d14..d7fc20e 100644
|
||||
index c7c5cbd3f7..5388586094 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,19 @@ 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,
|
||||
@@ -1407,7 +1408,6 @@ 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 );
|
||||
if (status == STATUS_SUCCESS) /* destination exists */
|
||||
{
|
||||
-
|
||||
options = FILE_NON_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT;
|
||||
if (flag & MOVEFILE_WRITE_THROUGH)
|
||||
options |= FILE_WRITE_THROUGH;
|
||||
diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c
|
||||
index f0f9232..6fcf019 100644
|
||||
index 07b3ffb77b..4729e75728 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 +52,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 +70,5 @@ index f0f9232..6fcf019 100644
|
||||
CloseHandle(hmapfile);
|
||||
CloseHandle(hfile);
|
||||
--
|
||||
2.9.0
|
||||
2.18.0
|
||||
|
||||
|
Reference in New Issue
Block a user