From b79ef475ac249fcfa52c15df9f8ae57c2727268a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 21 Jan 2019 18:39:25 -0400 Subject: [PATCH] still fixing this sigh --- Logs/Remote.hs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Logs/Remote.hs b/Logs/Remote.hs index 52d5532527..6b66495401 100644 --- a/Logs/Remote.hs +++ b/Logs/Remote.hs @@ -94,10 +94,14 @@ prop_parse_show_Config :: RemoteConfig -> Bool prop_parse_show_Config c -- whitespace and '=' are not supported in config keys | any (\k -> any isSpace k || elem '=' k) (M.keys c) = True - -- limit to alphanumerics for simplicity - | any (any (not . isAlphaNum)) (M.keys c) = True - | any (any (not . isAlphaNum)) (M.elems c) = True + | any (any excluded) (M.keys c) = True + | any (any excluded) (M.elems c) = True | otherwise = A.parseOnly remoteConfigParser (encodeBS $ showConfig c) ~~ Right c where normalize v = sort . M.toList <$> v a ~~ b = normalize a == normalize b + -- limit to ascii alphanumerics for simplicity; characters not + -- allowed by the current character set in the config may not + -- round-trip in an identical representation due to the use of the + -- filesystem encoding. + excluded c = not (isAlphaNum c) || not (isAscii c)