GUI: improve error handling in urlGoTo
This commit is contained in:
parent
47aee871be
commit
9efe2e5f60
@ -99,7 +99,7 @@ setCallbacks mygui myview = do
|
|||||||
-- |Go to the url given at the 'urlBar' and visualize it in the given
|
-- |Go to the url given at the 'urlBar' and visualize it in the given
|
||||||
-- treeView.
|
-- treeView.
|
||||||
urlGoTo :: MyGUI -> MyView -> IO ()
|
urlGoTo :: MyGUI -> MyView -> IO ()
|
||||||
urlGoTo mygui myview = do
|
urlGoTo mygui myview = withErrorDialog $ do
|
||||||
fp <- entryGetText (urlBar mygui)
|
fp <- entryGetText (urlBar mygui)
|
||||||
let abs = isAbsolute fp
|
let abs = isAbsolute fp
|
||||||
exists <- (||) <$> doesDirectoryExist fp <*> doesFileExist fp
|
exists <- (||) <$> doesDirectoryExist fp <*> doesFileExist fp
|
||||||
|
Loading…
Reference in New Issue
Block a user