From 6165c3649a537da8fe6e883de4823f01d6394dc0 Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Sat, 16 Jan 2016 09:21:27 +0000 Subject: [PATCH] * lisp/files.el (dir-locals--all-files): Respect absolute file-names --- lisp/files.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/files.el b/lisp/files.el index 7c6119b7ef9..5a15c71aab6 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3732,8 +3732,9 @@ The returned list is sorted by `string<' order." (require 'seq) (let ((dir (if (file-directory-p file-or-dir) file-or-dir - default-directory)) - (file (cond ((not (file-directory-p file-or-dir)) file-or-dir) + (or (file-name-directory file-or-dir) + default-directory))) + (file (cond ((not (file-directory-p file-or-dir)) (file-name-nondirectory file-or-dir)) ((eq system-type 'ms-dos) (dosified-file-name dir-locals-file)) (t dir-locals-file)))) (seq-filter (lambda (f) (and (file-readable-p f) -- 2.39.2