From 03124c42019401022e58ca9ebfa9b41735957ffb Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Tue, 14 Jun 2022 15:01:44 +0200 Subject: [PATCH] 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). --- lisp/files.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.2