From e0aff931023a6c3f7a06caaa5dfa1aad2da3889d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 23 Apr 2014 14:04:09 -0400 Subject: merge from git-annex --- Utility/Rsync.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Utility/Rsync.hs') diff --git a/Utility/Rsync.hs b/Utility/Rsync.hs index 2c5e39b..82166f6 100644 --- a/Utility/Rsync.hs +++ b/Utility/Rsync.hs @@ -124,6 +124,9 @@ rsyncUrlIsPath s - after the \r is the number of bytes processed. After the number, - there must appear some whitespace, or we didn't get the whole number, - and return the \r and part we did get, for later processing. + - + - In some locales, the number will have one or more commas in the middle + - of it. -} parseRsyncProgress :: String -> (Maybe Integer, String) parseRsyncProgress = go [] . reverse . progresschunks @@ -142,7 +145,7 @@ parseRsyncProgress = go [] . reverse . progresschunks parsebytes s = case break isSpace s of ([], _) -> Nothing (_, []) -> Nothing - (b, _) -> readish b + (b, _) -> readish $ filter (/= ',') b {- Filters options to those that are safe to pass to rsync in server mode, - without causing it to eg, expose files. -} -- cgit v1.2.3