]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix .dir-local.el caching for symlinks
authorLars Ingebrigtsen <larsi@gnus.org>
Tue, 14 Jun 2022 13:01:44 +0000 (15:01 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 14 Jun 2022 13:01:44 +0000 (15:01 +0200)
* 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

index 22fccb151cdd226aadc61a1e8502e93d2a95d2a2..a804f0088eebb8b408ab5205d279c9937d2be85a 100644 (file)
@@ -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