2
2
mirror of https://github.com/octoleo/restic.git synced 2024-05-29 07:00:49 +00:00

archiver: let FutureNode.Take return an error if no data is available

This ensures that we cannot accidentally store an invalid node.
This commit is contained in:
Michael Eischer 2022-08-19 23:19:29 +02:00
parent 2b88cd6eab
commit 8e38c43c27

View File

@ -306,7 +306,7 @@ func (fn *FutureNode) take(ctx context.Context) futureNodeResult {
} }
case <-ctx.Done(): case <-ctx.Done():
} }
return futureNodeResult{} return futureNodeResult{err: errors.Errorf("no result")}
} }
// allBlobsPresent checks if all blobs (contents) of the given node are // allBlobsPresent checks if all blobs (contents) of the given node are