sync: When listing contents on an import remote fails, proceed with other syncing instead of aborting

Switch listContents to being a proper CommandStart, so if it throws an
exception, it will be treated like any other command action that fails.

downloadImport apparently does not ever throw an exception,
and itself uses commandAction, so it can't be a CommandStart.
This commit is contained in:
Joey Hess 2019-04-10 17:02:56 -04:00
parent 3d6f1b7dba
commit f95f340c73
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 27 additions and 19 deletions

View file

@ -214,8 +214,8 @@ buildImportTrees basetree msubdir importable = History
{- Downloads all new ContentIdentifiers as needed to generate Keys.
- Supports concurrency when enabled.
-
- If any download fails, the whole thing fails, but it will resume where
- it left off.
- If any download fails, the whole thing fails with Nothing,
- but it will resume where it left off.
-}
downloadImport :: Remote -> ImportTreeConfig -> ImportableContents (ContentIdentifier, ByteSize) -> Annex (Maybe (ImportableContents Key))
downloadImport remote importtreeconfig importablecontents = do