From: Lars Ingebrigtsen Date: Tue, 14 Jun 2022 13:01:44 +0000 (+0200) Subject: Fix .dir-local.el caching for symlinks X-Git-Tag: emacs-29.0.90~1910^2~8 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=03124c42019401022e58ca9ebfa9b41735957ffb;p=emacs.git Fix .dir-local.el caching for symlinks * lisp/files.el (dir-locals-read-from-dir): We want the time stamp of the actual file, not the time stamp of the symlink (if .dir-locals.el is a symlink) (bug#46122). --- diff --git a/lisp/files.el b/lisp/files.el index 22fccb151cd..a804f0088ee 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -4497,7 +4497,7 @@ Return the new class name, which is a symbol named DIR." (with-demoted-errors "Error reading dir-locals: %S" (dolist (file files) (let ((file-time (file-attribute-modification-time - (file-attributes file)))) + (file-attributes (file-chase-links file))))) (if (time-less-p latest file-time) (setq latest file-time))) (with-temp-buffer