Bound external result file reads
This commit is contained in:
@@ -3,7 +3,6 @@ package stage
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -389,9 +388,9 @@ func resolveTrimmedOutputPath(paths artifacts.SessionPaths, cfg *config.TrimConf
|
||||
}
|
||||
|
||||
func copyTranscript(store artifacts.Store, src, dst string) error {
|
||||
data, err := os.ReadFile(src)
|
||||
data, err := readExternalResult(src, "seriatim trimmed transcript result")
|
||||
if err != nil {
|
||||
return fmt.Errorf("read source transcript: %w", err)
|
||||
return err
|
||||
}
|
||||
if err := store.WriteFileAtomic(dst, data, fileops.WorkspaceFileMode); err != nil {
|
||||
return fmt.Errorf("write destination transcript: %w", err)
|
||||
|
||||
Reference in New Issue
Block a user