]> code.delx.au - gnu-emacs/commitdiff
* lisp/files.el (dir-locals--all-files): Respect absolute file-names
authorArtur Malabarba <bruce.connor.am@gmail.com>
Sat, 16 Jan 2016 09:21:27 +0000 (09:21 +0000)
committerArtur Malabarba <bruce.connor.am@gmail.com>
Sat, 16 Jan 2016 09:24:08 +0000 (09:24 +0000)
lisp/files.el

index 7c6119b7ef9b98a9de250c4b7c842ed0deb6d6d0..5a15c71aab6cd99f3c8b22b05f016d0b8f928af2 100644 (file)
@@ -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)