diff options
| author | Joey Hess <joeyh@joeyh.name> | 2016-04-30 15:47:28 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2016-04-30 15:47:28 -0400 |
| commit | eb0a945d43c909273ffd9472c091db917ed6c1e2 (patch) | |
| tree | 0c9f95a3a543cf8fa85dfede4ab565fa00b43736 /src/Utility/Directory.hs | |
| parent | 6e09ae96c03ebc589ae9bb647e30de19fbe2f2e7 (diff) | |
| parent | 60b12654b0746f9c35a38002d34e9ac69f76c738 (diff) | |
Merge branch 'joeyconfig'
Diffstat (limited to 'src/Utility/Directory.hs')
| -rw-r--r-- | src/Utility/Directory.hs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Utility/Directory.hs b/src/Utility/Directory.hs index fae33b5c..3b12b9fc 100644 --- a/src/Utility/Directory.hs +++ b/src/Utility/Directory.hs @@ -6,12 +6,15 @@ -} {-# LANGUAGE CPP #-} -{-# OPTIONS_GHC -fno-warn-tabs #-} +{-# OPTIONS_GHC -fno-warn-tabs -w #-} -module Utility.Directory where +module Utility.Directory ( + module Utility.Directory, + module System.Directory +) where import System.IO.Error -import System.Directory +import System.Directory hiding (isSymbolicLink) import Control.Monad import System.FilePath import Control.Applicative @@ -134,11 +137,13 @@ moveFile src dest = tryIO (rename src dest) >>= onrename _ <- tryIO $ removeFile tmp throwM e' +#ifndef mingw32_HOST_OS isdir f = do r <- tryIO $ getFileStatus f case r of (Left _) -> return False (Right s) -> return $ isDirectory s +#endif {- Removes a file, which may or may not exist, and does not have to - be a regular file. |
