shell32: Fix SHFileOperation when deleting a nonexistent directory. (try 3)

Zhenbo Li litimetal at
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) */

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)

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: <>

More information about the wine-patches mailing list