From 91db5dfb006070a4875da133db8e8e386416c16e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 20 Jan 2015 17:27:42 -0400 Subject: build fix --- Utility/FileSize.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3