This commit is contained in:
Joey Hess 2010-10-13 23:31:08 -04:00
parent 8ab54401b6
commit e47dca162a

View file

@ -47,6 +47,7 @@ annexLocationRelative r backend key =
keyFile :: Key -> FilePath
keyFile key = replace "/" "%" $ replace "%" "&s" $ replace "&" "&a" $ show key
{- Reverses keyFile -}
{- Reverses keyFile, converting a filename fragment (ie, the basename of
- the symlink target) into a key. -}
fileKey :: FilePath -> Key
fileKey file = Key $ replace "&a" "&" $ replace "&s" "%" $ replace "%" "/" file