summaryrefslogtreecommitdiff
path: root/Remote/Rsync.hs
diff options
context:
space:
mode:
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