From: Michael Albinus Date: Wed, 10 Feb 2010 08:46:54 +0000 (+0100) Subject: * ls-lisp.el (ls-lisp-insert-directory): Wen WILDCARD-REGEXP and X-Git-Tag: emacs-pretest-23.1.93~82 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a8e4290b05511059af4e48988e58cbda85f5cd59;p=emacs.git * ls-lisp.el (ls-lisp-insert-directory): Wen WILDCARD-REGEXP and FULL-DIRECTORY-P are nil, and FILE is absolute, expand it. This prevents file names like "~/" been listed literally. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d4699aa64aa..d1adb4be590 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2010-02-10 Michael Albinus + + * ls-lisp.el (ls-lisp-insert-directory): Wen WILDCARD-REGEXP and + FULL-DIRECTORY-P are nil, and FILE is absolute, expand it. This + prevents file names like "~/" been listed literally. + 2010-02-10 Dan Nicolaescu * term/xterm.el (xterm-maybe-set-dark-background-mode): Remove diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el index 284e9db97ee..2e061558466 100644 --- a/lisp/ls-lisp.el +++ b/lisp/ls-lisp.el @@ -400,6 +400,7 @@ not contain `d', so that a full listing is expected." ;; If not full-directory-p, FILE *must not* end in /, as ;; file-attributes will not recognize a symlink to a directory, ;; so must make it a relative filename as ls does: + (if (file-name-absolute-p file) (setq file (expand-file-name file))) (if (eq (aref file (1- (length file))) ?/) (setq file (substring file 0 -1))) (let ((fattr (file-attributes file 'string)))