summaryrefslogtreecommitdiff
path: root/Remote/Rsync.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Remote/Rsync.hs')
-rw-r--r--Remote/Rsync.hs9
1 files changed, 6 insertions, 3 deletions
diff --git a/Remote/Rsync.hs b/Remote/Rsync.hs
index c3ef94a71..d89699270 100644
--- a/Remote/Rsync.hs
+++ b/Remote/Rsync.hs
@@ -166,9 +166,12 @@ checkPresent r o k = do
-- to connect, and the file not being present.
Right <$> check
where
- check = untilTrue (rsyncUrls o k) $ \u ->
- liftIO $ boolSystem "sh" [Param "-c", Param (cmd u)]
- cmd u = "rsync --quiet " ++ shellEscape u ++ " 2>/dev/null"
+ check = untilTrue (rsyncUrls o k) $ \u ->
+ liftIO $ catchBoolIO $ do
+ withQuietOutput createProcessSuccess $
+ proc "rsync" $ toCommand $
+ rsyncOptions o ++ [Param u]
+ return True
{- Rsync params to enable resumes of sending files safely,
- ensure that files are only moved into place once complete