shell32: Fix SHFileOperation when deleting a nonexistent directory. (try 3)
Zhenbo Li
litimetal at gmail.com
Sat Jun 21 09:34:58 CDT 2014
try 3:
1. Move the checker for DE_INVALIDFILES to SHELL_DeleteDirectoryW
2. Avoid TABs when re-writing SHELL_DeleteDirectoryW (Thank
Michael Stefaniuc)
3. Replace a wrong S_OK with ERROR_SUCCESS (Thank Jacek Caban)
I'm using such a checker in my code:
return ret == ERROR_PATH_NOT_FOUND ?
0x7C: /* DE_INVALIDFILES (legacy Windows error) */
ret;
I don't think it is beautiful, but as Alexandre mentioned,
> It would be better to avoid a redundant file lookup, particularly
> since it's only to set last error
So I'm wondering which is a better solution. I really appreciate your
feedback. Thank you very much.
try 2:
Thanks Alexandre
1. Let SHELL_DeleteDirectoryW return DWORD
2. Get the right return value by
ret = SHNotifyRemoveDirectoryW(pszDir)
origin:
Thanks Bruno Jesus
This patch would fix bug 34324, by returning correct
error value of SHFileOperation.
---
dlls/shell32/shlfileop.c | 68
+++++++++++++++++++++---------------------
dlls/shell32/tests/shlfileop.c | 4 ---
2 files changed, 34 insertions(+), 38 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-shell32-Fix-SHFileOperation-when-deleting-a-nonexisten.txt
Type: text/x-patch
Size: 4973 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20140621/b0db9afd/attachment.bin>
More information about the wine-patches
mailing list