From ad79e264252343bdbe9b0146321a5b1cd108718a Mon Sep 17 00:00:00 2001 From: vqn <85911372+vqns@users.noreply.github.com> Date: Sun, 21 Jan 2024 01:49:25 +0100 Subject: [PATCH] autoreload docs only if their filename matches an actual file (#1698) --- data/plugins/autoreload.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/plugins/autoreload.lua b/data/plugins/autoreload.lua index 8286d62f..f1ba6e0d 100644 --- a/data/plugins/autoreload.lua +++ b/data/plugins/autoreload.lua @@ -69,7 +69,7 @@ function dirwatch:check(change_callback, ...) for _, doc in ipairs(core.docs) do if doc.abs_filename and (dir == common.dirname(doc.abs_filename) or dir == doc.abs_filename) then local info = system.get_file_info(doc.filename or "") - if info and times[doc] ~= info.modified then + if info and info.type == "file" and times[doc] ~= info.modified then if not doc:is_dirty() and not config.plugins.autoreload.always_show_nagview then reload_doc(doc) else