]> dgit.raspbian.org Git - git-annex.git/commitdiff
fix build with old text
authorJoey Hess <joeyh@joeyh.name>
Mon, 29 Jul 2024 21:21:41 +0000 (17:21 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 29 Jul 2024 21:21:41 +0000 (17:21 -0400)
Don't need decodeUtf8Lenient here because B64.encode surely always
generates utf8. So decodeUtf8 is safe, it will never throw an exception.

P2P/Http/Types.hs

index 0471d07e2429147f1b62629f63a2efa0652be751..b7f7ce4807b43885b6f52f6f9116a3e98094aff4 100644 (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 ']')