diff options
author | Joey Hess <joey@kitenet.net> | 2010-10-17 16:39:30 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-10-17 16:39:30 -0400 |
commit | a020b0c25c4e7c2e14d685eac8c4d3aa0e1fef8a (patch) | |
tree | e008a967ab6ea350e97c723924fd8f95ad91d04c /Locations.hs | |
parent | 8398b9ab4a654f3f6ec570b70229a8a0030e8ab6 (diff) |
atomic file retrieval from backends
Diffstat (limited to 'Locations.hs')
-rw-r--r-- | Locations.hs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Locations.hs b/Locations.hs index 76516224c..2b0adb7ba 100644 --- a/Locations.hs +++ b/Locations.hs @@ -7,7 +7,8 @@ module Locations ( keyFile, fileKey, annexLocation, - annexLocationRelative + annexLocationRelative, + annexTmpLocation ) where import Data.String.Utils @@ -36,6 +37,11 @@ annexLocation r key = annexLocationRelative :: Git.Repo -> Key -> FilePath annexLocationRelative r key = Git.dir r ++ "/annex/" ++ (keyFile key) +{- .git-annex/tmp is used for temp files + -} +annexTmpLocation :: Git.Repo -> FilePath +annexTmpLocation r = (Git.workTree r) ++ "/" ++ Git.dir r ++ "/annex/tmp/" + {- Converts a key into a filename fragment. - - Escape "/" in the key name, to keep a flat tree of files and avoid |