fix build with old text

Don't need decodeUtf8Lenient here because B64.encode surely always
generates utf8. So decodeUtf8 is safe, it will never throw an exception.
This commit is contained in:
Joey Hess 2024-07-29 17:21:41 -04:00
parent dc11c5f493
commit 1467fed572
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -73,7 +73,7 @@ encodeB64Text b = case TE.decodeUtf8' b of
| otherwise -> t
Left _ -> b64wrapped
where
b64wrapped = TE.decodeUtf8Lenient $ "[" <> B64.encode b <> "]"
b64wrapped = TE.decodeUtf8 $ "[" <> B64.encode b <> "]"
openbracket = fromIntegral (ord '[')
closebracket = fromIntegral (ord ']')