LIB: make deleteDirRecursive a little bit more safer
This commit is contained in:
parent
5d44243689
commit
a81ef6a38c
@ -318,7 +318,8 @@ deleteDirRecursive f@(_ :/ Dir {}) = do
|
|||||||
case file of
|
case file of
|
||||||
(_ :/ SymLink {}) -> deleteSymlink file
|
(_ :/ SymLink {}) -> deleteSymlink file
|
||||||
(_ :/ Dir {}) -> deleteDirRecursive file
|
(_ :/ Dir {}) -> deleteDirRecursive file
|
||||||
(_ :/ f) -> removeLink (fullPath file)
|
(AFileLike _) -> removeLink (fullPath file)
|
||||||
|
_ -> throw $ FileDoesExist (fullPath file)
|
||||||
removeDirectory fp
|
removeDirectory fp
|
||||||
deleteDirRecursive _ = throw $ InvalidOperation "wrong input type"
|
deleteDirRecursive _ = throw $ InvalidOperation "wrong input type"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user