From ee869b08ffad4078067d5985025511311805e6f2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 11 May 2013 16:02:22 -0500 Subject: no need to stub moveFile, it works --- Utility/Directory.hs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'Utility') 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. - -- cgit v1.2.3