use ByteStrings when reading annex symlinks and pointers
Now there's a ByteString used all the way from disk to Key. The main complication in this conversion was the use of fromInternalGitPath in several places to munge things on Windows. The things that used that were changed to parse the ByteString using either path separator. Also some code that had read from files to a String lazily was changed to read a minimal strict ByteString.
This commit is contained in:
parent
0a8d93cb8a
commit
5d98cba923
10 changed files with 128 additions and 78 deletions
|
@ -302,11 +302,11 @@ onAddUnlocked' isdirect contentchanged addassociatedfile addlink samefilestatus
|
|||
case linktarget of
|
||||
Nothing -> a
|
||||
Just lt -> do
|
||||
case fileKey $ takeFileName lt of
|
||||
case parseLinkTarget lt of
|
||||
Nothing -> noop
|
||||
Just key -> liftAnnex $
|
||||
addassociatedfile key file
|
||||
onAddSymlink' linktarget mk isdirect file fs
|
||||
onAddSymlink' (Just $ fromRawFilePath lt) mk isdirect file fs
|
||||
|
||||
{- A symlink might be an arbitrary symlink, which is just added.
|
||||
- Or, if it is a git-annex symlink, ensure it points to the content
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue