summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-10-05 01:39:08 +0000
committerChristopher Faylor <me@cgf.cx>2001-10-05 01:39:08 +0000
commitaf39152f4cdca60c18aa9c3a1fa9d1eea480d4f2 (patch)
treeeb9d48000011b14cfde5eb21590adcdd14a6aa47
parentcbed6474df1a212ab127fdceb0ab83bc6c84b4a4 (diff)
downloadcygnal-af39152f4cdca60c18aa9c3a1fa9d1eea480d4f2.tar.gz
cygnal-af39152f4cdca60c18aa9c3a1fa9d1eea480d4f2.tar.bz2
cygnal-af39152f4cdca60c18aa9c3a1fa9d1eea480d4f2.zip
* spawn.cc (perhaps_suffix): Return NULL on non-existence of file as well as
"directoryness". Previous code modified on 2001/09/30 actually had an arguable bug which was unmasked by the change on that day.
-rw-r--r--winsup/cygwin/ChangeLog6
-rw-r--r--winsup/cygwin/spawn.cc2
2 files changed, 7 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 948c9dbed..e125866c4 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,9 @@
+Thu Oct 4 21:37:57 2001 Christopher Faylor <cgf@cygnus.com>
+
+ * spawn.cc (perhaps_suffix): Return NULL on non-existence of file as
+ well as "directoryness". Previous code modified on 2001/09/30 actually
+ had an arguable bug which was unmasked by the change on that day.
+
Thu Oct 4 20:52:42 2001 Christopher Faylor <cgf@cygnus.com>
* path.cc (path_conv::check): Return ENOTDIR when leading device and
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index 57f197eb8..ee004666b 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -63,7 +63,7 @@ perhaps_suffix (const char *prog, path_conv &buf)
debug_printf ("prog '%s'", prog);
buf.check (prog, PC_SYM_FOLLOW | PC_FULL, std_suffixes);
- if (buf.isdir ())
+ if (!buf.exists () || buf.isdir ())
ext = NULL;
else if (buf.known_suffix)
ext = (char *) buf + (buf.known_suffix - buf.get_win32 ());