Rebase against 86557b9e0ba8a783f1b0d0918b1ddec7e0a7749e.

This commit is contained in:
Zebediah Figura 2024-03-19 18:42:11 -05:00
parent badfcbc451
commit 63300ffaad
5 changed files with 13 additions and 68 deletions

View File

@ -1,4 +1,4 @@
From 7b8a67910d0a0f962e505ab73be75789432807ae Mon Sep 17 00:00:00 2001
From 72e0335ca16cd47b520db1fec02b5961d6da8da7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 26 Feb 2015 23:21:26 +0100
Subject: [PATCH] shell32: Pass FILE_INFORMATION into SHNotify* functions.
@ -9,7 +9,7 @@ Preparation of the progressbar work. Based on a patch by Huw Campbell.
1 file changed, 98 insertions(+), 103 deletions(-)
diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c
index 4e40e9dd71b..a64cc0d7f8d 100644
index 40d2c1d8a3c..07ab3f805aa 100644
--- a/dlls/shell32/shlfileop.c
+++ b/dlls/shell32/shlfileop.c
@@ -55,16 +55,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell);
@ -399,7 +399,7 @@ index 4e40e9dd71b..a64cc0d7f8d 100644
{
DWORD i;
INT mismatched = 0;
@@ -1403,14 +1400,12 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
@@ -1404,14 +1401,12 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
if (!flTo->dwNumFiles)
return ERROR_FILE_NOT_FOUND;
@ -416,16 +416,16 @@ index 4e40e9dd71b..a64cc0d7f8d 100644
flFrom->dwNumFiles > flTo->dwNumFiles)
{
return ERROR_CANCELLED;
@@ -1423,7 +1418,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
return ret;
}
@@ -1421,7 +1416,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
if (ret && ret != ERROR_ALREADY_EXISTS)
return ret;
- if (lpFileOp->fFlags & FOF_MULTIDESTFILES)
+ if (multidest)
mismatched = flFrom->dwNumFiles - flTo->dwNumFiles;
fileDest = &flTo->feFiles[0];
@@ -1434,7 +1429,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
@@ -1432,7 +1427,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
if (!PathFileExistsW(fileDest->szDirectory))
return ERROR_CANCELLED;
@ -434,7 +434,7 @@ index 4e40e9dd71b..a64cc0d7f8d 100644
{
if (i >= flTo->dwNumFiles)
break;
@@ -1448,9 +1443,9 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
@@ -1446,9 +1441,9 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
}
if (fileDest->bExists && IsAttribDir(fileDest->attributes))
@ -446,7 +446,7 @@ index 4e40e9dd71b..a64cc0d7f8d 100644
}
if (mismatched > 0)
@@ -1465,7 +1460,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
@@ -1463,7 +1458,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
}
/* the FO_RENAME files */
@ -455,7 +455,7 @@ index 4e40e9dd71b..a64cc0d7f8d 100644
{
const FILE_ENTRY *feFrom;
const FILE_ENTRY *feTo;
@@ -1487,7 +1482,7 @@ static int rename_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, con
@@ -1485,7 +1480,7 @@ static int rename_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, con
if (feTo->bExists)
return ERROR_ALREADY_EXISTS;
@ -464,7 +464,7 @@ index 4e40e9dd71b..a64cc0d7f8d 100644
}
/* alert the user if an unsupported flag is used */
@@ -1534,16 +1529,16 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
@@ -1532,16 +1527,16 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
switch (lpFileOp->wFunc)
{
case FO_COPY:
@ -486,5 +486,5 @@ index 4e40e9dd71b..a64cc0d7f8d 100644
default:
ret = ERROR_INVALID_PARAMETER;
--
2.40.1
2.43.0

View File

@ -1,3 +1,2 @@
Fixes: Support for shell32 file operation progress dialog
Depends: kernel32-CopyFileEx
Depends: shell32-SHFileOperation_Move

View File

@ -1,52 +0,0 @@
From 147822d028471e1ffa83193c9df85c4f7c04bc8b Mon Sep 17 00:00:00 2001
From: Zhenbo Li <litimetal@gmail.com>
Date: Fri, 14 Aug 2015 21:18:43 +0800
Subject: [PATCH] shell32: Fix SHFileOperation(FO_MOVE) for creating
subdirectories.
This patch fixes bug 25207.
---
dlls/shell32/shlfileop.c | 6 +++++-
dlls/shell32/tests/shlfileop.c | 4 ++--
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c
index 17a8e7046c7..01e1ab13bf5 100644
--- a/dlls/shell32/shlfileop.c
+++ b/dlls/shell32/shlfileop.c
@@ -1420,7 +1420,11 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
}
if (!PathFileExistsW(flTo->feFiles[0].szDirectory))
- return ERROR_CANCELLED;
+ {
+ int ret = SHCreateDirectoryExW(NULL, flTo->feFiles[0].szDirectory, NULL);
+ if (ret)
+ return ret;
+ }
if (lpFileOp->fFlags & FOF_MULTIDESTFILES)
mismatched = flFrom->dwNumFiles - flTo->dwNumFiles;
diff --git a/dlls/shell32/tests/shlfileop.c b/dlls/shell32/tests/shlfileop.c
index 273b09d5005..ed1c25a3528 100644
--- a/dlls/shell32/tests/shlfileop.c
+++ b/dlls/shell32/tests/shlfileop.c
@@ -2306,13 +2306,13 @@ static void test_move(void)
ok(!DeleteFileA("d.txt"), "Expected d.txt to not exist\n");
}
- /* FO_MOVE does not create dest directories */
+ /* FO_MOVE should create dest directories */
shfo.pFrom = "test2.txt\0";
shfo.pTo = "dir1\\dir2\\test2.txt\0";
retval = SHFileOperationA(&shfo);
if (dir_exists("dir1"))
{
- /* Vista and W2K8 (broken or new behavior ?) */
+ /* New behavior on Vista or later */
ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", retval);
ok(DeleteFileA("dir1\\dir2\\test2.txt"), "Expected dir1\\dir2\\test2.txt to exist\n");
RemoveDirectoryA("dir1\\dir2");
--
2.35.1

View File

@ -1,2 +0,0 @@
Fixes: [25207] SHFileOperation with FO_MOVE should create new directory on Vista+
# Patch might be incomplete, see https://bugs.wine-staging.com/show_bug.cgi?id=541#c3

View File

@ -1 +1 @@
9e639ff1f6c2b913518501b3f99ca085c4eed6c7
86557b9e0ba8a783f1b0d0918b1ddec7e0a7749e