summaryrefslogtreecommitdiff
path: root/Utility/Rsync.hs
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2014-10-12 14:32:56 -0400
committerJoey Hess <joey@kitenet.net>2014-10-12 14:32:56 -0400
commitefef527d5b2e42e261fa7af6947aad6553426ebe (patch)
tree082a5dad993557e9dffd76a69d4087371da8ed42 /Utility/Rsync.hs
parentab1cf3570207bd08ae0abbba183a8c570c0361f5 (diff)
downloadgit-repair-efef527d5b2e42e261fa7af6947aad6553426ebe.tar.gz
Merge from git-annex.
Includes changing to new exceptions library, and some whitespace fixes.
Diffstat (limited to 'Utility/Rsync.hs')
-rw-r--r--Utility/Rsync.hs12
1 files changed, 3 insertions, 9 deletions
diff --git a/Utility/Rsync.hs b/Utility/Rsync.hs
index 6038126..8dee609 100644
--- a/Utility/Rsync.hs
+++ b/Utility/Rsync.hs
@@ -57,7 +57,7 @@ rsync = boolSystem "rsync" . rsyncParamsFixup
rsyncParamsFixup :: [CommandParam] -> [CommandParam]
rsyncParamsFixup = map fixup
where
- fixup (File f) = File (toCygPath f)
+ fixup (File f) = File (toCygPath f)
fixup p = p
{- Runs rsync, but intercepts its progress output and updates a meter.
@@ -66,14 +66,8 @@ rsyncParamsFixup = map fixup
- The params must enable rsync's --progress mode for this to work.
-}
rsyncProgress :: MeterUpdate -> [CommandParam] -> IO Bool
-rsyncProgress meterupdate params = do
- r <- catchBoolIO $
- withHandle StdoutHandle createProcessSuccess p (feedprogress 0 [])
- {- For an unknown reason, piping rsync's output like this does
- - causes it to run a second ssh process, which it neglects to wait
- - on. Reap the resulting zombie. -}
- reapZombies
- return r
+rsyncProgress meterupdate params = catchBoolIO $
+ withHandle StdoutHandle createProcessSuccess p (feedprogress 0 [])
where
p = proc "rsync" (toCommand $ rsyncParamsFixup params)
feedprogress prev buf h = do