mod/notification-email: use $FileExists ...

... to work around restrictions in new file handling.
This commit is contained in:
Christian Hesse 2025-05-30 22:46:03 +02:00
parent daee05dbd7
commit e3284ca770

View file

@ -40,6 +40,7 @@
:global EitherOr;
:global EMailGenerateFrom;
:global FileExists;
:global IsDNSResolving;
:global IsTimeSync;
:global LogPrint;
@ -93,7 +94,7 @@
:onerror Err {
:local Attach ({});
:foreach File in=[ :toarray [ $EitherOr ($Message->"attach") "" ] ] do={
:if ([ :len [ /file/find where name=$File ] ] = 1) do={
:if ([ $FileExists $File ] = true) do={
:set Attach ($Attach, $File);
} else={
$LogPrint warning $0 ("File '" . $File . "' does not exist, can not attach.");