aboutsummaryrefslogtreecommitdiff
path: root/Annex
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-08-03 13:41:07 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-08-03 13:41:07 -0400
commite38ae12506c878b98779465bef167446bff506f9 (patch)
tree0dc7f352ad120de99d271f23f2936beefc5f7cd6 /Annex
parent508517de485e77196a8d8e33558f4185c50dea96 (diff)
Re-enable accumulating transfer failure log files for command-line actions
This was disabled in commit 7ca8bf3321d1b62ea4e817e28914ed2fa56afe30, because only the assistant used them, and they were clutter. But, now --failed also uses them. Remove the failure log files after successful transfers. Should avoid most of the clutter problems. Commit 7ca8bf3321d1b62ea4e817e28914ed2fa56afe30 mentions a subtle behavior change, which has now been reverted: There is one behavior change from this. If glacier is being used, and a manual git annex get --from glacier fails because the file isn't available yet, the assistant will no longer later see that failed transfer file and retry the get.
Diffstat (limited to 'Annex')
-rw-r--r--Annex/Transfer.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/Annex/Transfer.hs b/Annex/Transfer.hs
index 55a8d39f7..90aaa59c9 100644
--- a/Annex/Transfer.hs
+++ b/Annex/Transfer.hs
@@ -94,8 +94,12 @@ runTransfer' ignorelock t file shouldretry transferobserver transferaction = do
return observeFailure
else do
v <- retry info metervar $ transferaction meter
+ let ok = observeBool v
liftIO $ cleanup tfile lck
- transferobserver (observeBool v) t info
+ if ok
+ then removeFailedTransfer t
+ else recordFailedTransfer t info
+ transferobserver ok t info
return v
where
#ifndef mingw32_HOST_OS