X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Frun-program.lisp;h=e3a1299db80c6fefca686c84fabaafc13326fb60;hb=0b96758f3645dff3e681d82cc97ddab1faae27ac;hp=5ad4e128463801cbe5b7888ea425c33cf571ff52;hpb=5a2b6553fbbbb62fa789350facd0d56bb136045f;p=sbcl.git diff --git a/src/code/run-program.lisp b/src/code/run-program.lisp index 5ad4e12..e3a1299 100644 --- a/src/code/run-program.lisp +++ b/src/code/run-program.lisp @@ -382,6 +382,7 @@ ;;; Is UNIX-FILENAME the name of a file that we can execute? (defun unix-filename-is-executable-p (unix-filename) (declare (type simple-string unix-filename)) + (setf unix-filename (coerce unix-filename 'base-string)) (values (and (eq (sb-unix:unix-file-kind unix-filename) :file) (sb-unix:unix-access unix-filename sb-unix:x_ok)))) @@ -394,11 +395,11 @@ while start ;; the truename of a file naming a directory is the ;; directory, at least until pfdietz comes along and says why - ;; that's noncompliant - for fullpath = (merge-pathnames - pathname (truename - (subseq search-path start end))) - when (unix-filename-is-executable-p (namestring fullpath)) + ;; that's noncompliant -- CSR, c. 2003-08-10 + for truename = (probe-file (subseq search-path start end)) + for fullpath = (when truename (merge-pathnames pathname truename)) + when (and fullpath + (unix-filename-is-executable-p (namestring fullpath))) return fullpath)) ;;; FIXME: There shouldn't be two semiredundant versions of the