incremental verify for directory special remote

Added fileRetriever', which will let the remaining special remotes
eventually also support incremental verify.

Sponsored-by: Dartmouth College's DANDI project
This commit is contained in:
Joey Hess 2021-08-16 16:22:00 -04:00
parent a644f729ce
commit b1622eb932
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
13 changed files with 39 additions and 27 deletions

View file

@ -56,7 +56,7 @@ data CopyMethod = CopiedCoW | Copied
- being copied. But it is not finalized at the end.
-
- When copy-on-write is used, the IncrementalVerifier is not fed
- the content of the file.
- the content of the file, and verification using it will fail.
-
- Note that, when the destination file already exists, it's read both
- to start calculating the hash, and also to verify that its content is
@ -71,7 +71,11 @@ fileCopier _ src dest meterupdate iv = docopy
#else
fileCopier copycowtried src dest meterupdate iv =
ifM (liftIO $ tryCopyCoW copycowtried src dest meterupdate)
( return CopiedCoW
( do
-- Make sure the incremental verifier fails,
-- since we did not feed it.
liftIO $ maybe noop failIncremental iv
return CopiedCoW
, docopy
)
#endif