1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 12:21:25 -08:00

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).
This commit is contained in:
Lars Ingebrigtsen 2022-06-14 15:01:44 +02:00
parent a02bb84c80
commit 03124c4201

View 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