fix build with old bytestring
bytestring-0.11.3.0 is the first to have ShortByteString singleton. Unsure about what version added concat, but mconcat = concat.
This commit is contained in:
parent
4c032655c2
commit
c86142e22b
1 changed files with 2 additions and 2 deletions
|
@ -745,7 +745,7 @@ keyFile :: Key -> OsPath
|
||||||
keyFile k =
|
keyFile k =
|
||||||
let b = serializeKey'' k
|
let b = serializeKey'' k
|
||||||
in toOsPath $ if SB.any (`elem` needesc) b
|
in toOsPath $ if SB.any (`elem` needesc) b
|
||||||
then SB.concat $ map esc (SB.unpack b)
|
then mconcat $ map esc (SB.unpack b)
|
||||||
else b
|
else b
|
||||||
where
|
where
|
||||||
esc w = case chr (fromIntegral w) of
|
esc w = case chr (fromIntegral w) of
|
||||||
|
@ -753,7 +753,7 @@ keyFile k =
|
||||||
'%' -> "&s"
|
'%' -> "&s"
|
||||||
':' -> "&c"
|
':' -> "&c"
|
||||||
'/' -> "%"
|
'/' -> "%"
|
||||||
_ -> SB.singleton w
|
_ -> SB.pack [w]
|
||||||
|
|
||||||
needesc = map (fromIntegral . ord) ['&', '%', ':', '/']
|
needesc = map (fromIntegral . ord) ['&', '%', ':', '/']
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue