Signed-off-by: Ming Shao shaoming@uniontech.com --- dlls/shell32/shlfileop.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c index 87a445dd35c..ec4ff7ac036 100644 --- a/dlls/shell32/shlfileop.c +++ b/dlls/shell32/shlfileop.c @@ -1520,6 +1520,14 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp) ZeroMemory(&flFrom, sizeof(FILE_LIST)); ZeroMemory(&flTo, sizeof(FILE_LIST));
+ //windows seems to take the first path as a valid path when lpFileOp->pTo has multiple paths + if(lpFileOp->wFunc == FO_RENAME) + { + LPWSTR lpRefTo = lpFileOp->pTo; + while(*lpRefTo++); + if(*lpRefTo) *lpRefTo = '\0'; + } + if ((ret = parse_file_list(&flFrom, lpFileOp->pFrom))) return ret;
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=102761
Your paranoid android.
=== debiant2 (32 bit Chinese:China report) ===
shell32: shlfileop: Timeout
=== debiant2 (32 bit WoW report) ===
shell32: shlfileop: Timeout
Hi, I wrote a simple demo under windows, which verifies that the renaming of the function SHFileOperationA can succeed in the following scenarios: When the field pFrom in the structure SHFILEOPSTRUCTRE is unique, there are multiple fields pTo. But wine is a failure. Guess that in this scenario, windows only takes the first of the pTo fields as the valid value.
------------------ Original ------------------ From: "Marvin"<testbot@winehq.org>; Date: Fri, Nov 26, 2021 11:57 AM To: "shaoming"<shaoming@uniontech.com>; Cc: "wine-devel"<wine-devel@winehq.org>; Subject: Re: [PATH] shell32: Fixed a rename behavior
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=102761
Your paranoid android.
=== debiant2 (32 bit Chinese:China report) ===
shell32: shlfileop: Timeout
=== debiant2 (32 bit WoW report) ===
shell32: shlfileop: Timeout