rsync special remote: Include annex-rsync-options when running rsync to test a key's presence.
Also, use the new withQuietOutput function to avoid running the shell to /dev/null stderr in two other places.
This commit is contained in:
parent
67454ab7f3
commit
9767562f65
6 changed files with 39 additions and 18 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue