diff options
author | Joey Hess <id@joeyh.name> | 2013-05-11 16:02:22 -0500 |
---|---|---|
committer | Joey Hess <id@joeyh.name> | 2013-05-11 16:02:22 -0500 |
commit | ee869b08ffad4078067d5985025511311805e6f2 (patch) | |
tree | 2cdbaf5da809ae918eb9bd1c0c224cd4bf474c15 /Utility | |
parent | 4f4d997119aad64655283b3e70c8ee9d9a6c5fdf (diff) |
no need to stub moveFile, it works
Diffstat (limited to 'Utility')
-rwxr-xr-x | Utility/Directory.hs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/Utility/Directory.hs b/Utility/Directory.hs index 0dbba0584..599d41a03 100755 --- a/Utility/Directory.hs +++ b/Utility/Directory.hs @@ -5,14 +5,10 @@ - Licensed under the GNU GPL version 3 or higher. -} -{-# LANGUAGE CPP #-} - module Utility.Directory where import System.IO.Error -#ifndef mingw32_HOST_OS -import System.Posix.Files -#endif +import System.PosixCompat.Files import System.Directory import Control.Exception (throw) import Control.Monad @@ -61,7 +57,6 @@ dirContentsRecursive' (dir:dirs) = unsafeInterleaveIO $ do {- Moves one filename to another. - First tries a rename, but falls back to moving across devices if needed. -} moveFile :: FilePath -> FilePath -> IO () -#ifndef mingw32_HOST_OS moveFile src dest = tryIO (rename src dest) >>= onrename where onrename (Right _) = noop @@ -89,9 +84,6 @@ moveFile src dest = tryIO (rename src dest) >>= onrename case r of (Left _) -> return False (Right s) -> return $ isDirectory s -#else -moveFile = error "moveFile TODO" -#endif {- Removes a file, which may or may not exist. - |