From 94a3f7648cfc9d1d205e69eff0beec416d30a0fe Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 10 Dec 2014 09:44:26 +0100 Subject: [PATCH] * files.el (file-tree-walk): Use file-name-as-directory unconditionally. --- lisp/ChangeLog | 5 +++++ lisp/files.el | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 445a4618714..454ee000c9a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-12-10 Andreas Schwab + + * files.el (file-tree-walk): Use file-name-as-directory + unconditionally. + 2014-12-10 Lars Magne Ingebrigtsen * files.el (directory-files-recursively): Use diff --git a/lisp/files.el b/lisp/files.el index e948c745b3c..568c1bb58b1 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -743,8 +743,7 @@ The ACTION is applied to each subdirectory before descending into it, and if nil is returned at that point, the descent will be prevented. Directory entries are sorted with string-lessp." (cond ((file-directory-p dir) - (or (char-equal ?/ (aref dir (1- (length dir)))) - (setq dir (file-name-as-directory dir))) + (setq dir (file-name-as-directory dir)) (let ((lst (directory-files dir nil nil t)) fullname file) (while lst -- 2.39.2