From c88a65f2abba4e471bd60b68ff10da1a11fb60cd Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Mon, 14 May 2018 02:03:15 +0000 Subject: [PATCH] shell32: Choose return value for SHFileOperationA depending on windows version. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Based on a patch by Michael Müller. Signed-off-by: Alistair Leslie-Hughes Signed-off-by: Alexandre Julliard --- dlls/shell32/shlfileop.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c index 4507b729f3a..c7bd54d200b 100644 --- a/dlls/shell32/shlfileop.c +++ b/dlls/shell32/shlfileop.c @@ -882,6 +882,10 @@ int WINAPI SHFileOperationA(LPSHFILEOPSTRUCTA lpFileOp) if (ForFree) { retCode = SHFileOperationW(&nFileOp); + /* Windows 95/98 returns S_OK for this case. */ + if (retCode == ERROR_ACCESS_DENIED && (GetVersion() & 0x80000000)) + retCode = S_OK; + heap_free(ForFree); /* we cannot use wString, it was changed */ break; }