LIB: improve safety by ignoring invalid file names for file operations

This commit is contained in:
2015-12-27 20:17:14 +01:00
parent 9445574097
commit f2fb4e0be0
3 changed files with 28 additions and 1 deletions

View File

@@ -324,6 +324,9 @@ pattern InvFN <- (invalidFileName -> (True,_))
-- |Opposite of `InvFN`.
pattern ValFN f <- (invalidFileName -> (False, f))
pattern AFileInvFN <- (fst . invalidFileName . name . file -> True)
pattern FileInvFN <- (fst . invalidFileName . name -> True)
-- |Matches on directories or symlinks pointing to directories.
-- If the symlink is pointing to a symlink pointing to a directory, then