bugfix in escaping
This commit is contained in:
parent
fe612bac03
commit
9926fe5c8a
1 changed files with 2 additions and 2 deletions
|
@ -19,11 +19,11 @@ stateLoc = ".git-annex"
|
||||||
gitStateDir :: GitRepo -> FilePath
|
gitStateDir :: GitRepo -> FilePath
|
||||||
gitStateDir repo = (gitWorkTree repo) ++ "/" ++ stateLoc ++ "/"
|
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
|
- Just escape "/" in the key name, to keep a flat
|
||||||
- tree of files and avoid issues with files ending with "/" etc. -}
|
- tree of files and avoid issues with files ending with "/" etc. -}
|
||||||
keyFile :: Key -> FilePath
|
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/,
|
{- An annexed file's content is stored somewhere under .git/annex/,
|
||||||
- based on the key. -}
|
- based on the key. -}
|
||||||
|
|
Loading…
Reference in a new issue