better function name
This commit is contained in:
parent
1b6319a2c8
commit
2be6130053
1 changed files with 3 additions and 3 deletions
|
@ -534,9 +534,9 @@ fileKey = fileKey' . toRawFilePath
|
||||||
fileKey' :: RawFilePath -> Maybe Key
|
fileKey' :: RawFilePath -> Maybe Key
|
||||||
fileKey' = deserializeKey' . S8.intercalate "/" . map go . S8.split '%'
|
fileKey' = deserializeKey' . S8.intercalate "/" . map go . S8.split '%'
|
||||||
where
|
where
|
||||||
go = S8.concat . go' . S8.split '&'
|
go = S8.concat . unescafterfirst . S8.split '&'
|
||||||
go' [] = []
|
unescafterfirst [] = []
|
||||||
go' (b:bs) = b : map (unesc . S8.uncons) bs
|
unescafterfirst (b:bs) = b : map (unesc . S8.uncons) bs
|
||||||
unesc :: Maybe (Char, S8.ByteString) -> S8.ByteString
|
unesc :: Maybe (Char, S8.ByteString) -> S8.ByteString
|
||||||
unesc Nothing = mempty
|
unesc Nothing = mempty
|
||||||
unesc (Just ('c', b)) = S8.cons ':' b
|
unesc (Just ('c', b)) = S8.cons ':' b
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue