fix: resolve rebase conflicts, fix errcheck issues, implement FetchAndDecryptBlob

This commit is contained in:
clawbot
2026-02-20 00:19:13 -08:00
committed by user
parent 9879668c31
commit 3f834f1c9c
5 changed files with 45 additions and 16 deletions
+4 -2
View File
@@ -113,7 +113,7 @@ func (v *Vaultik) Restore(opts *RestoreOptions) error {
if err != nil {
return fmt.Errorf("creating blob cache: %w", err)
}
defer blobCache.Close()
defer func() { _ = blobCache.Close() }()
for i, file := range files {
if v.ctx.Err() != nil {
@@ -427,7 +427,9 @@ func (v *Vaultik) restoreRegularFile(
if err != nil {
return fmt.Errorf("downloading blob %s: %w", blobHashStr[:16], err)
}
if putErr := blobCache.Put(blobHashStr, blobData); putErr != nil { log.Debug("Failed to cache blob on disk", "hash", blobHashStr[:16], "error", putErr) }
if putErr := blobCache.Put(blobHashStr, blobData); putErr != nil {
log.Debug("Failed to cache blob on disk", "hash", blobHashStr[:16], "error", putErr)
}
result.BlobsDownloaded++
result.BytesDownloaded += blob.CompressedSize
}