summaryrefslogtreecommitdiff
path: root/Command
diff options
context:
space:
mode:
Diffstat (limited to 'Command')
-rw-r--r--Command/Fsck.hs3
-rw-r--r--Command/Info.hs3
-rw-r--r--Command/RecvKey.hs3
3 files changed, 3 insertions, 6 deletions
diff --git a/Command/Fsck.hs b/Command/Fsck.hs
index 46c1620f1..5dad10127 100644
--- a/Command/Fsck.hs
+++ b/Command/Fsck.hs
@@ -303,8 +303,7 @@ checkKeySizeOr :: (Key -> Annex String) -> Key -> FilePath -> Annex Bool
checkKeySizeOr bad key file = case Types.Key.keySize key of
Nothing -> return True
Just size -> do
- size' <- fromIntegral . fileSize
- <$> liftIO (getFileStatus file)
+ size' <- liftIO $ getFileSize file
comparesizes size size'
where
comparesizes a b = do
diff --git a/Command/Info.hs b/Command/Info.hs
index 36d93a270..86b608928 100644
--- a/Command/Info.hs
+++ b/Command/Info.hs
@@ -490,8 +490,7 @@ staleSize label dirspec = go =<< lift (dirKeys dirspec)
keysizes keys = do
dir <- lift $ fromRepo dirspec
liftIO $ forM keys $ \k -> catchDefaultIO 0 $
- fromIntegral . fileSize
- <$> getFileStatus (dir </> keyFile k)
+ getFileSize (dir </> keyFile k)
aside :: String -> String
aside s = " (" ++ s ++ ")"
diff --git a/Command/RecvKey.hs b/Command/RecvKey.hs
index 8a806875b..424ca923d 100644
--- a/Command/RecvKey.hs
+++ b/Command/RecvKey.hs
@@ -62,8 +62,7 @@ start key = fieldTransfer Download key $ \_p ->
oksize <- case Types.Key.keySize key of
Nothing -> return True
Just size -> do
- size' <- fromIntegral . fileSize
- <$> liftIO (getFileStatus tmp)
+ size' <- liftIO $ getFileSize tmp
return $ size == size'
if oksize
then case Backend.maybeLookupBackendName (Types.Key.keyBackendName key) of