LIB: fix throwDirDoesExist exception type
This commit is contained in:
parent
e67d68ab15
commit
34c6223c25
@ -36,6 +36,7 @@ data FmIOException = FileDoesNotExist String
|
||||
| NotAFile String
|
||||
| NotADir String
|
||||
| DestinationInSource String String
|
||||
| DirDoesExist String
|
||||
deriving (Show, Typeable)
|
||||
|
||||
|
||||
@ -65,7 +66,7 @@ throwNotAbsolute fp = unless (isAbsolute fp) (throw $ PathNotAbsolute fp)
|
||||
throwDirDoesExist :: FilePath -> IO ()
|
||||
throwDirDoesExist fp = do
|
||||
exists <- doesDirectoryExist fp
|
||||
when exists (throw $ FileDoesNotExist fp)
|
||||
when exists (throw $ DirDoesExist fp)
|
||||
|
||||
|
||||
throwDirDoesNotExist :: FilePath -> IO ()
|
||||
|
Loading…
Reference in New Issue
Block a user