]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix optionality
authorVsevolod Stakhov <vsevolod@rspamd.com>
Wed, 6 Nov 2024 13:56:56 +0000 (13:56 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Wed, 6 Nov 2024 13:56:56 +0000 (13:56 +0000)
conf/modules.conf
rules/rspamd.lua

index f99eab8dcbdf80f551064d75c9fd0574e0434d28..51f1f420e22ec16114689361544f69a4cc062baf 100644 (file)
@@ -15,4 +15,4 @@
 # See https://rspamd.com/doc/tutorials/writing_rules.html for details
 
 .include(glob=true) "${CONFDIR}/modules.d/*.conf"
-.include(glob=true) "${CONFDIR}/modules.local.d/*.conf"
\ No newline at end of file
+.include(try=true, glob=true) "${CONFDIR}/modules.local.d/*.conf"
\ No newline at end of file
index 3b80a035a6a4b975a1b50b350253b8d455e03278..e41a946cb8501bc5b357ab47369d7fd3b7c0efae 100644 (file)
@@ -51,7 +51,7 @@ else
   end
 end
 
-for local_lua in rspamd_util.glob(local_conf .. '/lua.local.d/*.lua') do
+for _, local_lua in ipairs(rspamd_util.glob(local_conf .. '/lua.local.d/*.lua') or {}) do
   dofile(local_lua)
 end