Commit 18514ca5 authored by Rolf Kalbermatter's avatar Rolf Kalbermatter Committed by Alexandre Julliard

Fix bug found by Piotr Caban, where our function tried to delete a

directory eventhough the user canceled the operation.
parent b0c45123
...@@ -52,7 +52,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell); ...@@ -52,7 +52,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell);
#define FO_MASK 0xF #define FO_MASK 0xF
CHAR aWildcardFile[] = {'*','.','*',0}; static const CHAR aWildcardFile[] = {'*','.','*',0};
static const WCHAR wWildcardFile[] = {'*','.','*',0}; static const WCHAR wWildcardFile[] = {'*','.','*',0};
static const WCHAR wWildcardChars[] = {'*','?',0}; static const WCHAR wWildcardChars[] = {'*','?',0};
static const WCHAR wBackslash[] = {'\\',0}; static const WCHAR wBackslash[] = {'\\',0};
...@@ -148,7 +148,7 @@ BOOL SHELL_DeleteDirectoryA(LPCSTR pszDir, BOOL bShowUI) ...@@ -148,7 +148,7 @@ BOOL SHELL_DeleteDirectoryA(LPCSTR pszDir, BOOL bShowUI)
if (hFind == INVALID_HANDLE_VALUE) if (hFind == INVALID_HANDLE_VALUE)
return FALSE; return FALSE;
if (!bShowUI || SHELL_ConfirmDialog(ASK_DELETE_FOLDER, pszDir)) if (!bShowUI || (ret = SHELL_ConfirmDialog(ASK_DELETE_FOLDER, pszDir)))
{ {
do do
{ {
...@@ -183,7 +183,7 @@ BOOL SHELL_DeleteDirectoryW(LPCWSTR pszDir, BOOL bShowUI) ...@@ -183,7 +183,7 @@ BOOL SHELL_DeleteDirectoryW(LPCWSTR pszDir, BOOL bShowUI)
if (hFind == INVALID_HANDLE_VALUE) if (hFind == INVALID_HANDLE_VALUE)
return FALSE; return FALSE;
if (!bShowUI || SHELL_ConfirmDialogW(ASK_DELETE_FOLDER, pszDir)) if (!bShowUI || (ret = SHELL_ConfirmDialogW(ASK_DELETE_FOLDER, pszDir)))
{ {
do do
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment