add back lost packString
authorJoey Hess <joeyh@joeyh.name>
Wed, 2 Mar 2022 22:22:38 +0000 (18:22 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 2 Mar 2022 22:22:38 +0000 (18:22 -0400)
The patch that removed it did not break anything, since the strings it's
used on are all ASCII not unicode. But I like making sure to use
packString everywhere just in case the code later changes in a way that
needs it.

Command/Info.hs

index 5ef3ffbb97dd9411dfd8c26f1399804de608281a..f2c476140277f5782f23eb1a3ad3dcdfbd96bc6e 100644 (file)
@@ -446,7 +446,7 @@ transfer_list = stat desc $ nojson $ lift $ do
                , maybe (fromUUID $ transferUUID t) Remote.name $
                        M.lookup (transferUUID t) uuidmap
                ]
-       jsonify t i = object $
+       jsonify t i = object $ map (\(k, v) -> (textKey (packString k), v)) $
                [ ("transfer", toJSON' (formatDirection (transferDirection t)))
                , ("key", toJSON' (transferKey t))
                , ("file", toJSON' (fromRawFilePath <$> afile))