From 8e2867a3e14c4921ee1e4be7edb3aaf7d9e3abcc Mon Sep 17 00:00:00 2001 From: mpl Date: Mon, 4 Jan 2016 22:10:27 +0100 Subject: [PATCH] fastjpeg: remove work-around for os/exec bug Because that was a hack for isssue #550 , which has been properly fixed in Go 1.5 Issue #621 Change-Id: I5def4b0ea2f4887a052985997249d9e71a0b93c9 --- pkg/images/fastjpeg/fastjpeg.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/pkg/images/fastjpeg/fastjpeg.go b/pkg/images/fastjpeg/fastjpeg.go index 6c99035a0..c3c632b87 100644 --- a/pkg/images/fastjpeg/fastjpeg.go +++ b/pkg/images/fastjpeg/fastjpeg.go @@ -211,14 +211,8 @@ func DecodeDownsample(r io.Reader, factor int) (image.Image, error) { stderrW := new(bytes.Buffer) cmd.Stderr = stderrW if err := cmd.Run(); err != nil { - // cmd.ProcessState == nil happens if /lib/*/ld-x.yz.so is missing, which gives you the ever useful: - // "fork/exec /usr/bin/djpeg: no such file or directory" error message. - // So of course it only happens on broken systems and this check is probably overkill. - if cmd.ProcessState == nil || !cmd.ProcessState.Success() { - djpegFailureVar.Add(1) - return nil, DjpegFailedError{Err: fmt.Errorf("%v: %s", err, stderrW)} - } - // false alarm, so proceed. See http://camlistore.org/issue/550 + djpegFailureVar.Add(1) + return nil, DjpegFailedError{Err: fmt.Errorf("%v: %s", err, stderrW)} } djpegSuccessVar.Add(1) djpegBytesReadVar.Add(int64(w.Len()))