aboutsummaryrefslogtreecommitdiff
path: root/Command/Unused.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-10-10 17:27:00 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-10-10 17:27:00 -0400
commit110c8f7b8e1fa484752298de5b48ea50b195066a (patch)
tree2bf785e8dc21b4b23046188d194431445a41e77f /Command/Unused.hs
parent3a48563e5258f650e6da41a90d2140bf033ce58f (diff)
queue downloads of keys that fsck finds with bad content
Diffstat (limited to 'Command/Unused.hs')
-rw-r--r--Command/Unused.hs14
1 files changed, 1 insertions, 13 deletions
diff --git a/Command/Unused.hs b/Command/Unused.hs
index d49cda54b..6210b2115 100644
--- a/Command/Unused.hs
+++ b/Command/Unused.hs
@@ -304,7 +304,7 @@ withKeysReferencedInGitRef a ref = do
-}
staleKeysPrune :: (Git.Repo -> FilePath) -> Bool -> Annex [Key]
staleKeysPrune dirspec nottransferred = do
- contents <- staleKeys dirspec
+ contents <- dirKeys dirspec
dups <- filterM inAnnex contents
let stale = contents `exclude` dups
@@ -319,18 +319,6 @@ staleKeysPrune dirspec nottransferred = do
return $ filter (`S.notMember` inprogress) stale
else return stale
-staleKeys :: (Git.Repo -> FilePath) -> Annex [Key]
-staleKeys dirspec = do
- dir <- fromRepo dirspec
- ifM (liftIO $ doesDirectoryExist dir)
- ( do
- contents <- liftIO $ getDirectoryContents dir
- files <- liftIO $ filterM doesFileExist $
- map (dir </>) contents
- return $ mapMaybe (fileKey . takeFileName) files
- , return []
- )
-
data UnusedMaps = UnusedMaps
{ unusedMap :: UnusedMap
, unusedBadMap :: UnusedMap