diff options
author | Joey Hess <joey@kitenet.net> | 2012-04-21 23:32:33 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-04-21 23:32:33 -0400 |
commit | ed79596b758935a3f22bf6803bc082a6bbe10f58 (patch) | |
tree | 885a8a50e68dafb39ec886cb31aa4c549fbeb35e /Utility/Directory.hs | |
parent | bee420bd2d0cbe16489b061b208083e2b8ba9d0e (diff) |
noop
Diffstat (limited to 'Utility/Directory.hs')
-rw-r--r-- | Utility/Directory.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Utility/Directory.hs b/Utility/Directory.hs index 40e65d634..e6622d31e 100644 --- a/Utility/Directory.hs +++ b/Utility/Directory.hs @@ -19,6 +19,7 @@ import Control.Applicative import Utility.SafeCommand import Utility.TempFile import Utility.Exception +import Utility.Monad {- Lists the contents of a directory. - Unlike getDirectoryContents, paths are not relative to the directory. -} @@ -34,7 +35,7 @@ dirContents d = map (d </>) . filter notcruft <$> getDirectoryContents d moveFile :: FilePath -> FilePath -> IO () moveFile src dest = tryIO (rename src dest) >>= onrename where - onrename (Right _) = return () + onrename (Right _) = noop onrename (Left e) | isPermissionError e = rethrow | isDoesNotExistError e = rethrow |