diff lisp/files.el @ 30733:df4c120d3d81

(recover-file): Call insert-directory instead of invoking `ls' directly.
author Eli Zaretskii <eliz@gnu.org>
date Thu, 10 Aug 2000 10:43:41 +0000
parents b0c302c3b209
children 46752ce55a92
line wrap: on
line diff
--- a/lisp/files.el	Thu Aug 10 10:35:40 2000 +0000
+++ b/lisp/files.el	Thu Aug 10 10:43:41 2000 +0000
@@ -3030,12 +3030,15 @@
 	     (not (file-exists-p file-name)))
 	   (error "Auto-save file %s not current" file-name))
 	  ((save-window-excursion
-	     (if (not (memq system-type '(vax-vms windows-nt)))
-		 (with-output-to-temp-buffer "*Directory*"
-		   (buffer-disable-undo standard-output)
-		   (call-process "ls" nil standard-output nil
-				 (if (file-symlink-p file) "-lL" "-l")
-				 file file-name)))
+	     (with-output-to-temp-buffer "*Directory*"
+	       (buffer-disable-undo standard-output)
+	       (save-excursion
+		 (let ((switches dired-listing-switches))
+		   (if (file-symlink-p file)
+		       (setq switches (concat switches "L")))
+		   (set-buffer standard-output)
+		   (insert-directory file switches)
+		   (insert-directory file-name switches))))
 	     (yes-or-no-p (format "Recover auto save file %s? " file-name)))
 	   (switch-to-buffer (find-file-noselect file t))
 	   (let ((buffer-read-only nil)