change retrieveExportWithContentIdentifier to take a list of ContentIdentifier
This partly fixes an issue where there are duplicate files in the special remote, and the first file gets swapped with another duplicate, or deleted. The swap case is fixed by this, the deleted case will need other changes. This makes retrieveExportWithContentIdentifier take a list of allowed ContentIdentifier, same as storeExportWithContentIdentifier, removeExportWithContentIdentifier, and checkPresentExportWithContentIdentifier. Of the special remotes that support importtree, borg is a special case and does not use content identifiers, S3 I assume can't get mixed up like this, directory certainly has the problem, and adb also appears to have had the problem. Sponsored-by: Graham Spencer on Patreon
This commit is contained in:
parent
3adf1f24e2
commit
0ffc59d341
7 changed files with 32 additions and 29 deletions
|
@ -334,7 +334,7 @@ data ImportActions a = ImportActions
|
|||
-- Throws exception on failure to access the remote.
|
||||
, importKey :: Maybe (ImportLocation -> ContentIdentifier -> ByteSize -> MeterUpdate -> a (Maybe Key))
|
||||
-- Retrieves a file from the remote. Ensures that the file
|
||||
-- it retrieves has the requested ContentIdentifier.
|
||||
-- it retrieves has one of the requested ContentIdentifiers.
|
||||
--
|
||||
-- This has to be used rather than retrieveExport
|
||||
-- when a special remote supports imports, since files on such a
|
||||
|
@ -343,7 +343,7 @@ data ImportActions a = ImportActions
|
|||
-- Throws exception on failure.
|
||||
, retrieveExportWithContentIdentifier
|
||||
:: ExportLocation
|
||||
-> ContentIdentifier
|
||||
-> [ContentIdentifier]
|
||||
-- file to write content to
|
||||
-> FilePath
|
||||
-- Either the key, or when it's not yet known, a callback
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue