summaryrefslogtreecommitdiff
path: root/Locations.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-10-13 00:58:59 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-10-13 00:58:59 -0400
commit67ae9d7fa109503e4b798e2b7703282b92ce3deb (patch)
tree375b45936f516bf05a7f858d3ba10d9d9f450878 /Locations.hs
parent14d7b2ac13318ba513bbab4f08b98434741f0e12 (diff)
relative symlink to annexed file
Diffstat (limited to 'Locations.hs')
-rw-r--r--Locations.hs9
1 files changed, 7 insertions, 2 deletions
diff --git a/Locations.hs b/Locations.hs
index b859fd2f2..faf29235f 100644
--- a/Locations.hs
+++ b/Locations.hs
@@ -5,7 +5,8 @@ module Locations (
gitStateDir,
stateLoc,
keyFile,
- annexLocation
+ annexLocation,
+ annexLocationRelative
) where
import Data.String.Utils
@@ -28,6 +29,10 @@ keyFile key = replace "/" "&s" $ replace "&" "&a" key
- .git/annex/<backend>/<key> ; this allows deriving the key and backend
- by looking at the symlink to it. -}
annexLocation :: State -> Backend -> Key -> FilePath
-annexLocation state backend key =
+annexLocation state backend key =
+ (gitWorkTree $ repo state) ++ "/" ++
+ (annexLocationRelative state backend key)
+annexLocationRelative :: State -> Backend -> Key -> FilePath
+annexLocationRelative state backend key =
gitDir (repo state) ++ "/annex/" ++ (name backend) ++
"/" ++ (keyFile key)