summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-10-13 00:21:34 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-10-13 00:21:34 -0400
commit9926fe5c8a1479f734c0a5b68c7c4e6ddfc2f8cf (patch)
tree3cfc25b604de365460c6852ec6c30d39ad3672a3
parentfe612bac0361b42af2cdff590797e929cebbb53d (diff)
bugfix in escaping
-rw-r--r--Locations.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Locations.hs b/Locations.hs
index 925aa39e5..c12b9fadc 100644
--- a/Locations.hs
+++ b/Locations.hs
@@ -19,11 +19,11 @@ stateLoc = ".git-annex"
gitStateDir :: GitRepo -> FilePath
gitStateDir repo = (gitWorkTree repo) ++ "/" ++ stateLoc ++ "/"
-{- Generates a filename that can be used to record a key somewhere to disk.
+{- Converts a key into a filename fragment.
- Just escape "/" in the key name, to keep a flat
- tree of files and avoid issues with files ending with "/" etc. -}
keyFile :: Key -> FilePath
-keyFile key = replace "/" "%" $ replace "%" "%%" key
+keyFile key = replace "/" "&s" $ replace "&" "&a" key
{- An annexed file's content is stored somewhere under .git/annex/,
- based on the key. -}