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
This commit is contained in:
mpl 2016-01-04 22:10:27 +01:00
parent 8e862472a4
commit 8e2867a3e1
1 changed files with 2 additions and 8 deletions

View File

@ -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()))