From 18514ca547e563f0937748d64aa324bbe4f946c6 Mon Sep 17 00:00:00 2001 From: Rolf Kalbermatter Date: Wed, 6 Oct 2004 00:04:39 +0000 Subject: [PATCH] Fix bug found by Piotr Caban, where our function tried to delete a directory eventhough the user canceled the operation. --- dlls/shell32/shlfileop.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c index 7ecb5b94927..3891b377f14 100644 --- a/dlls/shell32/shlfileop.c +++ b/dlls/shell32/shlfileop.c @@ -52,7 +52,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell); #define FO_MASK 0xF -CHAR aWildcardFile[] = {'*','.','*',0}; +static const CHAR aWildcardFile[] = {'*','.','*',0}; static const WCHAR wWildcardFile[] = {'*','.','*',0}; static const WCHAR wWildcardChars[] = {'*','?',0}; static const WCHAR wBackslash[] = {'\\',0}; @@ -148,7 +148,7 @@ BOOL SHELL_DeleteDirectoryA(LPCSTR pszDir, BOOL bShowUI) if (hFind == INVALID_HANDLE_VALUE) return FALSE; - if (!bShowUI || SHELL_ConfirmDialog(ASK_DELETE_FOLDER, pszDir)) + if (!bShowUI || (ret = SHELL_ConfirmDialog(ASK_DELETE_FOLDER, pszDir))) { do { @@ -183,7 +183,7 @@ BOOL SHELL_DeleteDirectoryW(LPCWSTR pszDir, BOOL bShowUI) if (hFind == INVALID_HANDLE_VALUE) return FALSE; - if (!bShowUI || SHELL_ConfirmDialogW(ASK_DELETE_FOLDER, pszDir)) + if (!bShowUI || (ret = SHELL_ConfirmDialogW(ASK_DELETE_FOLDER, pszDir))) { do {