diff options
author | Joey Hess <joey@kitenet.net> | 2011-08-30 15:16:34 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-08-30 15:16:34 -0400 |
commit | ea7b1828d48a5dce42393d252f4bbda5cba10d24 (patch) | |
tree | b168a07b595cc90c3f45e3b3f0afa0f0365c4ea0 /Content.hs | |
parent | abe3b5bf783b65b2d1e071117c99fe6aa790bf0a (diff) |
unused, status: Sped up by avoiding unnecessary stats of annexed files.
Statting files returned by dirContents to see if they exist and are regular
files seems pretty useless. This code was originally part of fsck, and
perhaps the idea then was to avoid things returned by dirContents that were
not files. But it's certianly not needed in the current use cases for
getKeysPresent.
Diffstat (limited to 'Content.hs')
-rw-r--r-- | Content.hs | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/Content.hs b/Content.hs index ba99f1330..1c2475240 100644 --- a/Content.hs +++ b/Content.hs @@ -254,15 +254,8 @@ getKeysPresent' dir = do levela <- dirContents dir levelb <- mapM dirContents levela contents <- mapM dirContents (concat levelb) - files <- filterM present (concat contents) + let files = concat contents return $ mapMaybe (fileKey . takeFileName) files - where - present d = do - result <- try $ - getFileStatus $ d </> takeFileName d - case result of - Right s -> return $ isRegularFile s - Left _ -> return False {- Things to do to record changes to content. -} saveState :: Annex () |