summaryrefslogtreecommitdiff
path: root/Locations.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-04-29 13:59:00 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-04-29 13:59:00 -0400
commit43f0a666f0f6cc152a2b778921831d6d7daedcaf (patch)
treebd65e820843c23677131f29517064f543683d766 /Locations.hs
parent49efc6c39928baec03d7dd0d5cb37f346432f1d3 (diff)
unused: Now also lists files fsck places in .git/annex/bad/
Diffstat (limited to 'Locations.hs')
-rw-r--r--Locations.hs11
1 files changed, 8 insertions, 3 deletions
diff --git a/Locations.hs b/Locations.hs
index f263ea526..1c4f8296e 100644
--- a/Locations.hs
+++ b/Locations.hs
@@ -17,6 +17,7 @@ module Locations (
gitAnnexTmpDir,
gitAnnexTmpLocation,
gitAnnexBadDir,
+ gitAnnexBadLocation,
gitAnnexUnusedLog,
isLinkToAnnex,
logFile,
@@ -105,9 +106,13 @@ gitAnnexTmpLocation r key = gitAnnexTmpDir r </> keyFile key
gitAnnexBadDir :: Git.Repo -> FilePath
gitAnnexBadDir r = addTrailingPathSeparator $ gitAnnexDir r </> "bad"
-{- .git/annex/unused is used to number possibly unused keys -}
-gitAnnexUnusedLog :: Git.Repo -> FilePath
-gitAnnexUnusedLog r = gitAnnexDir r </> "unused"
+{- The bad file to use for a given key. -}
+gitAnnexBadLocation :: Git.Repo -> Key -> FilePath
+gitAnnexBadLocation r key = gitAnnexBadDir r </> keyFile key
+
+{- .git/annex/*unused is used to number possibly unused keys -}
+gitAnnexUnusedLog :: FilePath -> Git.Repo -> FilePath
+gitAnnexUnusedLog prefix r = gitAnnexDir r </> (prefix ++ "unused")
{- Checks a symlink target to see if it appears to point to annexed content. -}
isLinkToAnnex :: FilePath -> Bool