bugfix
The first item in the list from split '&' did not start with a '&'
This commit is contained in:
parent
e0c4ac99b5
commit
d5bbf123fd
1 changed files with 3 additions and 2 deletions
|
@ -531,8 +531,9 @@ fileKey = fileKey' . toRawFilePath
|
|||
fileKey' :: RawFilePath -> Maybe Key
|
||||
fileKey' = deserializeKey' . S8.intercalate "/" . map go . S8.split '%'
|
||||
where
|
||||
go :: S8.ByteString -> S8.ByteString
|
||||
go = S8.concat . map (unesc . S8.uncons) . S8.split '&'
|
||||
go = S8.concat . go' . S8.split '&'
|
||||
go' [] = []
|
||||
go' (b:bs) = b : map (unesc . S8.uncons) bs
|
||||
unesc :: Maybe (Char, S8.ByteString) -> S8.ByteString
|
||||
unesc Nothing = mempty
|
||||
unesc (Just ('c', b)) = S8.cons ':' b
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue