aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Blandy1993-03-23 07:41:49 +0000
committerJim Blandy1993-03-23 07:41:49 +0000
commit632c2579f7522e8e760ef1342a01fa52d018f8ef (patch)
tree61373c2800317911a21894f8926be7188b005e2f
parent86dbbfc21182d7567aba74184505fea3b61e2796 (diff)
downloademacs-632c2579f7522e8e760ef1342a01fa52d018f8ef.tar.gz
emacs-632c2579f7522e8e760ef1342a01fa52d018f8ef.zip
* files.el (insert-directory): Do chase symlinks before passing
the directory name to ls.
-rw-r--r--lisp/files.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/files.el b/lisp/files.el
index f27ceff0506..dc2d39319ec 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -1689,10 +1689,13 @@ If WILDCARD, it also runs the shell specified by `shell-file-name'."
1689 "-c" (concat insert-directory-program 1689 "-c" (concat insert-directory-program
1690 " -d " switches " " 1690 " -d " switches " "
1691 (file-name-nondirectory file)))) 1691 (file-name-nondirectory file))))
1692;;; ;; Chase links till we reach a non-link. 1692 ;; Chase links till we reach a non-link.
1693;;; (let (symlink) 1693 ;; This used to be commented out, but Barry Margolin says:
1694;;; (while (setq symlink (file-symlink-p file)) 1694 ;; SunOS 4.1.3 (and SV and POSIX?) lists the link
1695;;; (setq file symlink))) 1695 ;; if we give a link to a directory - yuck!
1696 (let (symlink)
1697 (while (setq symlink (file-symlink-p file))
1698 (setq file symlink)))
1696 (call-process insert-directory-program nil t nil switches file)))))) 1699 (call-process insert-directory-program nil t nil switches file))))))
1697 1700
1698(defun save-buffers-kill-emacs (&optional arg) 1701(defun save-buffers-kill-emacs (&optional arg)