diff options
Diffstat (limited to 'Logs')
-rw-r--r-- | Logs/Transfer.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Logs/Transfer.hs b/Logs/Transfer.hs index 13f94ea20..9bde51f40 100644 --- a/Logs/Transfer.hs +++ b/Logs/Transfer.hs @@ -262,6 +262,12 @@ getFailedTransfers u = catMaybes <$> (liftIO . getpairs =<< concat <$> findfiles findfiles = liftIO . mapM dirContentsRecursive =<< mapM (fromRepo . failedTransferDir u) [Download, Upload] +clearFailedTransfers :: UUID -> Annex [(Transfer, TransferInfo)] +clearFailedTransfers u = do + failed <- getFailedTransfers u + mapM_ removeFailedTransfer $ map fst failed + return failed + removeFailedTransfer :: Transfer -> Annex () removeFailedTransfer t = do f <- fromRepo $ failedTransferFile t |