changeset 2335:e5a37be50b36

* files.el (insert-directory): Do chase symlinks before passing the directory name to ls.
author Jim Blandy <jimb@redhat.com>
date Tue, 23 Mar 1993 07:41:49 +0000
parents ec4ffd67483d
children 7aaafd275bec
files lisp/files.el
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Tue Mar 23 07:26:34 1993 +0000
+++ b/lisp/files.el	Tue Mar 23 07:41:49 1993 +0000
@@ -1689,10 +1689,13 @@
 			    "-c" (concat insert-directory-program
 					 " -d " switches " "
 					 (file-name-nondirectory file))))
-;;;	  ;; Chase links till we reach a non-link.
-;;;	  (let (symlink)
-;;;	    (while (setq symlink (file-symlink-p file))
-;;;	      (setq file symlink)))
+	  ;; Chase links till we reach a non-link.
+	  ;; This used to be commented out, but Barry Margolin says:
+	  ;; SunOS 4.1.3 (and SV and POSIX?) lists the link
+	  ;; if we give a link to a directory - yuck!
+	  (let (symlink)
+	    (while (setq symlink (file-symlink-p file))
+	      (setq file symlink)))
 	  (call-process insert-directory-program nil t nil switches file))))))
 
 (defun save-buffers-kill-emacs (&optional arg)