diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-01-20 17:27:42 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-01-20 17:27:42 -0400 |
commit | 91db5dfb006070a4875da133db8e8e386416c16e (patch) | |
tree | 0c0ad813c48af8c3cadb95cdebf22c2153c1e90d | |
parent | 2844864f91868fa9b5de18070a349bad3d92826f (diff) |
build fix
-rw-r--r-- | Utility/FileSize.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Utility/FileSize.hs b/Utility/FileSize.hs index 3113695d3..1055754cb 100644 --- a/Utility/FileSize.hs +++ b/Utility/FileSize.hs @@ -8,8 +8,10 @@ module Utility.FileSize where import System.PosixCompat.Files +#ifdef mingw32_HOST_OS import Control.Exception (bracket) import System.IO +#endif {- Gets the size of a file. - @@ -19,7 +21,7 @@ import System.IO -} getFileSize :: FilePath -> IO Integer #ifndef mingw32_HOST_OS -getFileSize f = fromIntegral . fileSize <$> getFileStatus f +getFileSize f = fmap (fromIntegral . fileSize) (getFileStatus f) #else getFileSize f = bracket (openFile f ReadMode) hClose hFileSize #endif |