diff --git a/ChangeLog b/ChangeLog index 59e99040..f36d7574 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2012-06-01 Frank Warmerdam + * libtiff/tif_unix.c: use strerror() to return a more specific error message + on failed open. + http://bugzilla.maptools.org/show_bug.cgi?id=2341 + * libtiff/tif_jpeg.c: Fix JPEGDecodeRaw() bugs. http://bugzilla.maptools.org/show_bug.cgi?id=2386 diff --git a/libtiff/tif_unix.c b/libtiff/tif_unix.c index 7c5cc50f..1387558f 100644 --- a/libtiff/tif_unix.c +++ b/libtiff/tif_unix.c @@ -1,4 +1,4 @@ -/* $Id: tif_unix.c,v 1.22 2010-03-10 18:56:49 bfriesen Exp $ */ +/* $Id: tif_unix.c,v 1.23 2012-06-01 21:40:59 fwarmerdam Exp $ */ /* * Copyright (c) 1988-1997 Sam Leffler @@ -186,7 +186,11 @@ TIFFOpen(const char* name, const char* mode) fd = open(name, m, 0666); if (fd < 0) { - TIFFErrorExt(0, module, "%s: Cannot open", name); + if (errno > 0 && strerror(errno) != NULL ) { + TIFFErrorExt(0, module, "%s: %s", name, strerror(errno) ); + } else { + TIFFErrorExt(0, module, "%s: Cannot open", name); + } return ((TIFF *)0); }