Update fileDialog.hs
This commit is contained in:
parent
64a6b5035a
commit
264a28aea4
1 changed files with 1 additions and 2 deletions
|
|
@ -22,8 +22,7 @@ selectFolder :: FileDialog -> ApplicationWindow -> (Maybe String -> IO ()) -> IO
|
|||
selectFolder fd w k =
|
||||
fileDialogSelectFolder fd (Just w) (Nothing :: Maybe Cancellable) $ Just $ \_ r -> do
|
||||
mbPath <- runMaybeT $ do
|
||||
f <- MaybeT $ handleDialogError (\_ _ -> pure Nothing)
|
||||
(fileDialogSelectFolderFinish fd r)
|
||||
f <- MaybeT $ handleDialogError (\_ _ -> pure Nothing) (fileDialogSelectFolderFinish fd r)
|
||||
p <- MaybeT $ fileGetPath f
|
||||
p <$ (liftIO (doesDirectoryExist p) >>= guard)
|
||||
k mbPath
|
||||
|
|
|
|||
Loading…
Reference in a new issue