Unify previous source resolution

This commit is contained in:
2026-08-10 21:20:59 +00:00
parent d9fa1d9328
commit b39b68add7
20 changed files with 406 additions and 76 deletions

View File

@@ -1,6 +1,7 @@
package app
import (
"bytes"
"context"
"crypto/sha256"
"encoding/hex"
@@ -104,6 +105,10 @@ func executeRestoreDownloadAction(
return fmt.Errorf("create destination directory: %w", err)
}
temporary, err := fileops.DownloadToSiblingTemp(safeLocalPath, func(destination io.Writer) error {
if len(action.VerifiedContent) > 0 {
_, err := io.Copy(destination, bytes.NewReader(action.VerifiedContent))
return err
}
return storage.DownloadTo(ctx, store, action.RemoteKey, destination)
})
if err != nil {