Module: wine Branch: master Commit: c88a65f2abba4e471bd60b68ff10da1a11fb60cd URL: https://source.winehq.org/git/wine.git/?a=commit;h=c88a65f2abba4e471bd60b68f...
Author: Alistair Leslie-Hughes leslie_alistair@hotmail.com Date: Mon May 14 02:03:15 2018 +0000
shell32: Choose return value for SHFileOperationA depending on windows version.
Based on a patch by Michael Müller.
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/shell32/shlfileop.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c index 4507b72..c7bd54d 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; }