summaryrefslogtreecommitdiff
path: root/Remote/Rsync.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-01-02 14:54:23 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-01-03 00:11:00 -0400
commitfc80b8d96bf287a0b83c1402e3a7c5ebfc7bc4a4 (patch)
tree344c45f3bf1cd263e80bbb456700574b95ba90fd /Remote/Rsync.hs
parent5cd44282a92dd6fa7eacc62858c8b8e553590195 (diff)
factor observe_
Diffstat (limited to 'Remote/Rsync.hs')
-rw-r--r--Remote/Rsync.hs4
1 files changed, 1 insertions, 3 deletions
diff --git a/Remote/Rsync.hs b/Remote/Rsync.hs
index 2fe302ba5..1461b96cd 100644
--- a/Remote/Rsync.hs
+++ b/Remote/Rsync.hs
@@ -172,9 +172,7 @@ withRsyncScratchDir a = do
let tmp = t </> "rsynctmp" </> show pid
nuke tmp
liftIO $ createDirectoryIfMissing True tmp
- res <- a tmp
- nuke tmp
- return res
+ observe_ (nuke tmp) (a tmp)
where
nuke d = liftIO $
doesDirectoryExist d >>? removeDirectoryRecursive d