summaryrefslogtreecommitdiff
path: root/Remote/Rsync.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-01-24 15:28:13 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-01-24 16:22:07 -0400
commitce5637498fd4158f98376009dee2d22bec2d1f68 (patch)
treee529bad846ce43424c9b535206b75f3b53f6cdee /Remote/Rsync.hs
parentba6088b249902d456177af3c14f20f43b6def1fd (diff)
remove Utility.Conditional and use IfElse
This drops the >>! and >>? with the nice low fixity. IfElse does have undocumented >>=>>! and >>=>>? operators, but I deem that too fishy. Anyway, using whenM and unlessM is easier; I sometimes mixed the operators up.
Diffstat (limited to 'Remote/Rsync.hs')
-rw-r--r--Remote/Rsync.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Remote/Rsync.hs b/Remote/Rsync.hs
index 8de6ba6a7..c7efe4200 100644
--- a/Remote/Rsync.hs
+++ b/Remote/Rsync.hs
@@ -181,8 +181,8 @@ withRsyncScratchDir a = do
liftIO $ createDirectoryIfMissing True tmp
nuke tmp `after` a tmp
where
- nuke d = liftIO $
- doesDirectoryExist d >>? removeDirectoryRecursive d
+ nuke d = liftIO $ whenM (doesDirectoryExist d) $
+ removeDirectoryRecursive d
rsyncRemote :: RsyncOpts -> [CommandParam] -> Annex Bool
rsyncRemote o params = do