summaryrefslogtreecommitdiff
path: root/Locations.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-01-28 14:10:50 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-01-28 14:10:50 -0400
commite6da7eb1770e506661d8c6755736ed285a17554a (patch)
tree170d6a8c3a73a84f7d44de3580a774837fc8cf8f /Locations.hs
parent04fe906ac6e611fd59ef44244a01e8fe61abec6f (diff)
Improved temp file handling
* Improved temp file handling. Transfers of content can now be resumed from temp files later; the resume does not have to be the immediate next git-annex run. * unused: Include partially transferred content in the list.
Diffstat (limited to 'Locations.hs')
-rw-r--r--Locations.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Locations.hs b/Locations.hs
index 75843c29e..d30ceb136 100644
--- a/Locations.hs
+++ b/Locations.hs
@@ -15,6 +15,7 @@ module Locations (
gitAnnexDir,
gitAnnexObjectDir,
gitAnnexTmpDir,
+ gitAnnexTmpLocation,
gitAnnexBadDir,
gitAnnexUnusedLog,
isLinkToAnnex,
@@ -83,6 +84,10 @@ gitAnnexObjectDir r = addTrailingPathSeparator $ Git.workTree r </> objectDir
gitAnnexTmpDir :: Git.Repo -> FilePath
gitAnnexTmpDir r = addTrailingPathSeparator $ gitAnnexDir r </> "tmp"
+{- The temp file to use for a given key. -}
+gitAnnexTmpLocation :: Git.Repo -> Key -> FilePath
+gitAnnexTmpLocation r key = gitAnnexTmpDir r </> keyFile key
+
{- .git-annex/bad/ is used for bad files found during fsck -}
gitAnnexBadDir :: Git.Repo -> FilePath
gitAnnexBadDir r = addTrailingPathSeparator $ gitAnnexDir r </> "bad"