summaryrefslogtreecommitdiff
path: root/Remote/Rsync.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-01-09 18:42:29 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-01-09 18:42:29 -0400
commit0c893f8743bab81077e3ee0fed0993b746d7a269 (patch)
treeb3ddc0665c28fadbfac58fbc43fc8a9dc85f3956 /Remote/Rsync.hs
parent680e6839ee42c754a58f8e57bf15a8063a16c6bb (diff)
Special remotes now all rollback storage of keys that get modified during the transfer, which can happen in direct mode.
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 9a38e4f1b..79d742aed 100644
--- a/Remote/Rsync.hs
+++ b/Remote/Rsync.hs
@@ -101,11 +101,11 @@ rsyncUrls o k = map use annexHashes
f = keyFile k
store :: RsyncOpts -> Key -> AssociatedFile -> MeterUpdate -> Annex Bool
-store o k _f p = sendAnnex k $ rsyncSend o p k
+store o k _f p = sendAnnex k (void $ remove o k) $ rsyncSend o p k
storeEncrypted :: RsyncOpts -> (Cipher, Key) -> Key -> MeterUpdate -> Annex Bool
storeEncrypted o (cipher, enck) k p = withTmp enck $ \tmp ->
- sendAnnex k $ \src -> do
+ sendAnnex k (void $ remove o enck) $ \src -> do
liftIO $ encrypt cipher (feedFile src) $
readBytes $ L.writeFile tmp
rsyncSend o p enck tmp