From: Zhenbo Li Subject: shell32: change return value of SHFileOperation when deleting files Message-Id: <5294C03D.7000501@gmail.com> Date: Tue, 26 Nov 2013 23:37:33 +0800 This patch should fix bug 34324. When deleting files, I can't find a situation to return ERROR_PATH_NOT_FOUND --- dlls/shell32/shlfileop.c | 2 +- dlls/shell32/tests/shlfileop.c | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c index 4ef7803..ea3ea35 100644 --- a/dlls/shell32/shlfileop.c +++ b/dlls/shell32/shlfileop.c @@ -1380,7 +1380,7 @@ static DWORD delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom) bPathExists = SHELL_DeleteDirectoryW(lpFileOp->hwnd, fileEntry->szFullPath, FALSE); if (!bPathExists) - return ERROR_PATH_NOT_FOUND; + return ERROR_FILE_NOT_FOUND; } return ERROR_SUCCESS; diff --git a/dlls/shell32/tests/shlfileop.c b/dlls/shell32/tests/shlfileop.c index 14ace24..f161d01 100644 --- a/dlls/shell32/tests/shlfileop.c +++ b/dlls/shell32/tests/shlfileop.c @@ -622,7 +622,6 @@ static void test_delete(void) shfo.pFrom = "nonexistent.txt\0"; shfo.wFunc = FO_DELETE; ret = SHFileOperationA(&shfo); - todo_wine ok(ret == 1026 || ret == ERROR_FILE_NOT_FOUND || /* Vista */ broken(ret == ERROR_SUCCESS), /* NT4 */ @@ -651,7 +650,6 @@ static void test_delete(void) shfo.pFrom = "test1.txt\0nonexistent.txt\0test2.txt\0"; shfo.wFunc = FO_DELETE; ret = SHFileOperationA(&shfo); - todo_wine ok(ret == 1026 || ret == ERROR_FILE_NOT_FOUND || /* Vista */ broken(ret == ERROR_SUCCESS), /* NT4 */ @@ -664,7 +662,6 @@ static void test_delete(void) init_shfo_tests(); shfo.pFrom = "testdir2\\nonexistent.txt\0"; ret = SHFileOperationA(&shfo); - todo_wine ok(ret == ERROR_FILE_NOT_FOUND || /* Vista */ broken(ret == 0x402) || /* XP */ broken(ret == ERROR_SUCCESS), /* NT4 */