Skip to content

Commit

Permalink
check returned err from file.Seek
Browse files Browse the repository at this point in the history
  • Loading branch information
dahn510 committed Aug 22, 2024
1 parent 3bedc2d commit 2b006fc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion recycle/recycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ func (r *RecycleDepot) lastSalvagedFile(record *os.File) (string, error) {

substrs := strings.Split(line, ",")

record.Seek(0, io.SeekEnd)
_, err := record.Seek(0, io.SeekEnd)
if err != nil {
return "", err
}

fid := strings.TrimSuffix(substrs[2], "\n")

Expand Down

0 comments on commit 2b006fc

Please sign in to comment.