GUI: improve error handling in urlGoTo

This commit is contained in:
Julian Ospald 2015-12-24 05:52:46 +01:00
parent 47aee871be
commit 9efe2e5f60
No known key found for this signature in database
GPG Key ID: 220CD1C5BDEED020

View File

@ -99,7 +99,7 @@ setCallbacks mygui myview = do
-- |Go to the url given at the 'urlBar' and visualize it in the given
-- treeView.
urlGoTo :: MyGUI -> MyView -> IO ()
urlGoTo mygui myview = do
urlGoTo mygui myview = withErrorDialog $ do
fp <- entryGetText (urlBar mygui)
let abs = isAbsolute fp
exists <- (||) <$> doesDirectoryExist fp <*> doesFileExist fp