From 88aeb849f620a13da47508045daae461a223c997 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 11 Aug 2015 18:40:59 -0400 Subject: Fix setting/setting/viewing metadata that contains unicode or other special characters, when in a non-unicode locale. Oh boy, not again. So, another place that the filesystem encoding needs to be applied. Yay. In passing, I changed decodeBS so if a NUL is embedded in the input, the resulting FilePath doesn't get truncated at that NUL. This was needed to make prop_b64_roundtrips pass, and on reviewing the callers of decodeBS, I didn't see any where this wouldn't make sense. When a FilePath is used to operate on the filesystem, it'll get truncated at a NUL anyway, whereas if a String is being used for something else, it might conceivably have a NUL in it, and we wouldn't want it to get truncated when going through decodeBS. (NB: There may be a speed impact from this change.) --- Annex/TaggedPush.hs | 1 - 1 file changed, 1 deletion(-) (limited to 'Annex') diff --git a/Annex/TaggedPush.hs b/Annex/TaggedPush.hs index 642d4db0b..eff8d6e0e 100644 --- a/Annex/TaggedPush.hs +++ b/Annex/TaggedPush.hs @@ -45,7 +45,6 @@ fromTaggedBranch b = case split "/" $ Git.fromRef b of ("refs":"synced":u:_base) -> Just (toUUID u, Nothing) _ -> Nothing - where taggedPush :: UUID -> Maybe String -> Git.Ref -> Remote -> Git.Repo -> IO Bool taggedPush u info branch remote = Git.Command.runBool -- cgit v1.2.3