Mercurial > emacs
diff lisp/ls-lisp.el @ 107118:68c91c0692df
* 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.
author | Michael Albinus <michael.albinus@gmx.de> |
---|---|
date | Wed, 10 Feb 2010 09:46:54 +0100 |
parents | 1d1d5d9bd884 |
children | 988b3f9a342a cda2045a5ee8 |
line wrap: on
line diff
--- a/lisp/ls-lisp.el Tue Feb 09 21:33:17 2010 -0800 +++ b/lisp/ls-lisp.el Wed Feb 10 09:46:54 2010 +0100 @@ -400,6 +400,7 @@ ;; 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)))