Unify previous source resolution
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user