summaryrefslogtreecommitdiff
path: root/UMain.pas
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2008-10-12 16:08:51 +0200
committerTomas Bzatek <tbzatek@users.sourceforge.net>2008-10-12 16:08:51 +0200
commitaf364d17a3d33dacaf644f9641d9332c7ce90914 (patch)
tree4018ddc16c08292e65bbc7249ae272d4eb1fb4d5 /UMain.pas
parentf35af507573469b7c1692f01922d323bd1000fbc (diff)
downloadtuxcmd-af364d17a3d33dacaf644f9641d9332c7ce90914.tar.xz
Drop the error message if one of the callback dialogs were cancelled during ChangeDir
Diffstat (limited to 'UMain.pas')
-rw-r--r--UMain.pas7
1 files changed, 5 insertions, 2 deletions
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