* src/lread.c (openp): If exec-path is nil, no files would be
found to execute (bug#30564).
Test cases:
(let ((exec-path ()))
(call-process "/bin/ls" nil (current-buffer)))
This would previously fail, but now works.
(let ((exec-path '("/bin/")))
(call-process "ls" nil (current-buffer)))
This worked, and still works.
absolute = complete_filename_p (str);
- for (; CONSP (path); path = XCDR (path))
+ do
{
ptrdiff_t baselen, prefixlen;
- filename = Fexpand_file_name (str, XCAR (path));
+ if (NILP (path))
+ filename = str;
+ else
+ filename = Fexpand_file_name (str, XCAR (path));
if (!complete_filename_p (filename))
/* If there are non-absolute elts in PATH (eg "."). */
/* Of course, this could conceivably lose if luser sets
}
if (absolute)
break;
- }
+ path = XCDR (path);
+ } while (CONSP (path));
SAFE_FREE ();
errno = last_errno;