diff options
Diffstat (limited to 'vendor/github.com/superseriousbusiness/exif-terminator/terminator.go')
-rw-r--r-- | vendor/github.com/superseriousbusiness/exif-terminator/terminator.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/vendor/github.com/superseriousbusiness/exif-terminator/terminator.go b/vendor/github.com/superseriousbusiness/exif-terminator/terminator.go index b6225f6dc..36f2d8b3a 100644 --- a/vendor/github.com/superseriousbusiness/exif-terminator/terminator.go +++ b/vendor/github.com/superseriousbusiness/exif-terminator/terminator.go @@ -25,7 +25,7 @@ import ( "fmt" "io" - jpegstructure "github.com/dsoprea/go-jpeg-image-structure/v2" + jpegstructure "github.com/superseriousbusiness/go-jpeg-image-structure/v2" pngstructure "github.com/dsoprea/go-png-image-structure/v2" ) @@ -109,8 +109,11 @@ func scanAndClose(scanner *bufio.Scanner, writer io.WriteCloser) { // until the pipeReader starts being read by the caller, which // is why we do this asynchronously go func() { + defer writer.Close() for scanner.Scan() { } - writer.Close() + if scanner.Err() != nil { + logger.Error(scanner.Err()) + } }() } |