Skip to content

Commit

Permalink
Fix nil panic (#903)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjh1 authored Oct 6, 2023
1 parent 2eeb00c commit ee289a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pipeline/ffmpeg.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ func copyFileToLocalTmpAndSegment(job *JobInfo) error {
// Create a temporary local file to write to
localSourceFile, err := os.CreateTemp(os.TempDir(), LocalSourceFilePattern)
if err != nil {
return fmt.Errorf("failed to create local file (%s) for segmenting: %s", localSourceFile.Name(), err)
return fmt.Errorf("failed to create local file for segmenting: %w", err)
}
defer localSourceFile.Close()
defer os.Remove(localSourceFile.Name()) // Clean up the file as soon as we're done segmenting
Expand Down

0 comments on commit ee289a8

Please sign in to comment.