diff options
Diffstat (limited to 'Annex')
-rw-r--r-- | Annex/Content.hs | 4 | ||||
-rw-r--r-- | Annex/Transfer.hs | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/Annex/Content.hs b/Annex/Content.hs index 37090d3bb..60daaab90 100644 --- a/Annex/Content.hs +++ b/Annex/Content.hs @@ -234,8 +234,8 @@ prepGetViaTmpChecked key unabletoget getkey = do tmp <- fromRepo $ gitAnnexTmpObjectLocation key e <- liftIO $ doesFileExist tmp - alreadythere <- if e - then fromIntegral . fileSize <$> liftIO (getFileStatus tmp) + alreadythere <- liftIO $ if e + then getFileSize tmp else return 0 ifM (checkDiskSpace Nothing key alreadythere) ( do diff --git a/Annex/Transfer.hs b/Annex/Transfer.hs index fb89869f8..1603974ff 100644 --- a/Annex/Transfer.hs +++ b/Annex/Transfer.hs @@ -132,8 +132,7 @@ runTransfer' ignorelock t file shouldretry a = do liftIO $ readMVar metervar | otherwise = do f <- fromRepo $ gitAnnexTmpObjectLocation (transferKey t) - liftIO $ catchDefaultIO 0 $ - fromIntegral . fileSize <$> getFileStatus f + liftIO $ catchDefaultIO 0 $ getFileSize f type RetryDecider = TransferInfo -> TransferInfo -> Bool |