diff options
| -rw-r--r-- | lisp/eshell/esh-ext.el | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/eshell/esh-ext.el b/lisp/eshell/esh-ext.el index fb1fedc9c54..2a495225dc2 100644 --- a/lisp/eshell/esh-ext.el +++ b/lisp/eshell/esh-ext.el | |||
| @@ -299,11 +299,13 @@ line of the form #!<interp>." | |||
| 299 | (let ((fullname (if (file-name-directory file) file | 299 | (let ((fullname (if (file-name-directory file) file |
| 300 | (eshell-search-path file))) | 300 | (eshell-search-path file))) |
| 301 | (suffixes eshell-binary-suffixes)) | 301 | (suffixes eshell-binary-suffixes)) |
| 302 | (if (and fullname | 302 | (when (and fullname |
| 303 | (not (file-remote-p fullname)) | 303 | (not (file-remote-p fullname)) |
| 304 | (file-remote-p default-directory)) | 304 | (file-remote-p default-directory)) |
| 305 | (setq fullname (expand-file-name | 305 | (setq fullname |
| 306 | (concat "./" fullname) default-directory))) | 306 | (if (file-name-absolute-p fullname) |
| 307 | (concat (file-remote-p default-directory) fullname) | ||
| 308 | (expand-file-name fullname default-directory)))) | ||
| 307 | (if (and fullname (not (or eshell-force-execution | 309 | (if (and fullname (not (or eshell-force-execution |
| 308 | (file-executable-p fullname)))) | 310 | (file-executable-p fullname)))) |
| 309 | (while suffixes | 311 | (while suffixes |