Re-enable accumulating transfer failure log files for command-line actions

This was disabled in commit 61ccf95004,
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 61ccf95004 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.
This commit is contained in:
Joey Hess 2016-08-03 13:41:07 -04:00
parent 1a0e2c9901
commit f461bcae4b
Failed to extract signature
4 changed files with 12 additions and 8 deletions

View file

@ -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