# HG changeset patch # User Michael Albinus # Date 1265791614 -3600 # Node ID 68c91c0692dff7f0539cd4aeafad04fef8af8777 # Parent 8839cd62c3d233dfb44b682078247c4dffad3fdc * 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 -r 8839cd62c3d2 -r 68c91c0692df lisp/ChangeLog --- a/lisp/ChangeLog Tue Feb 09 21:33:17 2010 -0800 +++ b/lisp/ChangeLog Wed Feb 10 09:46:54 2010 +0100 @@ -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 -r 8839cd62c3d2 -r 68c91c0692df lisp/ls-lisp.el --- 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)))