From af364d17a3d33dacaf644f9641d9332c7ce90914 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Sun, 12 Oct 2008 16:08:51 +0200 Subject: Drop the error message if one of the callback dialogs were cancelled during ChangeDir --- UMain.pas | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'UMain.pas') diff --git a/UMain.pas b/UMain.pas index 719ac2d..90f61b5 100644 --- a/UMain.pas +++ b/UMain.pas @@ -1858,8 +1858,11 @@ begin OpenDirThread.Free; end else if OpenDirThread.ChDirResult <> 0 then begin - if OpenDirThread.ChDirResult = 1 then Application.MessageBox(Format(LANGErrorGettingListingForSPanelNoPath, [LANGPanelStrings[LeftPanel], 'Exception']), [mbOK], mbError, mbNone, mbOK) - else Application.MessageBox(Format(LANGErrorGettingListingForSPanel, [LANGPanelStrings[LeftPanel], GetErrorString(OpenDirThread.ChDirResult), NewPath]), [mbOK], mbError, mbNone, mbOK); + if not OpenDirThread.VFSCallbackCancelled then begin + // Drop the error message if one of the callback dialogs were cancelled + if OpenDirThread.ChDirResult = 1 then Application.MessageBox(Format(LANGErrorGettingListingForSPanelNoPath, [LANGPanelStrings[LeftPanel], 'Exception']), [mbOK], mbError, mbNone, mbOK) + else Application.MessageBox(Format(LANGErrorGettingListingForSPanel, [LANGPanelStrings[LeftPanel], GetErrorString(OpenDirThread.ChDirResult), NewPath]), [mbOK], mbError, mbNone, mbOK); + end; DebugMsg(['TFMain.ChangingDir: Freeing thread...']); OpenDirThread.Free; end else begin -- cgit v1.2.3