* 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.
This commit is contained in:
@@ -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 ());
|
||||
|
Reference in New Issue
Block a user