aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2010-02-10 09:46:54 +0100
committerMichael Albinus2010-02-10 09:46:54 +0100
commita8e4290b05511059af4e48988e58cbda85f5cd59 (patch)
treeb017748c07d71790490e65468f3100a0b9087931
parentc59d6fadf77535f3ecb36fec13271ee0a97a65b3 (diff)
downloademacs-a8e4290b05511059af4e48988e58cbda85f5cd59.tar.gz
emacs-a8e4290b05511059af4e48988e58cbda85f5cd59.zip
* 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.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/ls-lisp.el1
2 files changed, 7 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d4699aa64aa..d1adb4be590 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12010-02-10 Michael Albinus <michael.albinus@gmx.de>
2
3 * ls-lisp.el (ls-lisp-insert-directory): Wen WILDCARD-REGEXP and
4 FULL-DIRECTORY-P are nil, and FILE is absolute, expand it. This
5 prevents file names like "~/" been listed literally.
6
12010-02-10 Dan Nicolaescu <dann@ics.uci.edu> 72010-02-10 Dan Nicolaescu <dann@ics.uci.edu>
2 8
3 * term/xterm.el (xterm-maybe-set-dark-background-mode): Remove 9 * 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."
400 ;; If not full-directory-p, FILE *must not* end in /, as 400 ;; If not full-directory-p, FILE *must not* end in /, as
401 ;; file-attributes will not recognize a symlink to a directory, 401 ;; file-attributes will not recognize a symlink to a directory,
402 ;; so must make it a relative filename as ls does: 402 ;; so must make it a relative filename as ls does:
403 (if (file-name-absolute-p file) (setq file (expand-file-name file)))
403 (if (eq (aref file (1- (length file))) ?/) 404 (if (eq (aref file (1- (length file))) ?/)
404 (setq file (substring file 0 -1))) 405 (setq file (substring file 0 -1)))
405 (let ((fattr (file-attributes file 'string))) 406 (let ((fattr (file-attributes file 'string)))