From c4dc034da7325f4be86e43b01b665c87d05ff21d Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Thu, 18 Dec 2025 17:47:58 -0800 Subject: [PATCH] Don't save allowed modules if fetching them fails --- proftpd/proftpd-lib.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/proftpd/proftpd-lib.pl b/proftpd/proftpd-lib.pl index a604056d3..9afc73b15 100755 --- a/proftpd/proftpd-lib.pl +++ b/proftpd/proftpd-lib.pl @@ -34,8 +34,10 @@ if ($oldsite{'size'} != $st[7] || } } close(MODS); - $site{'modules'} = join(" ", @mods); - &write_file("$module_config_directory/site", \%site); + if (!$? || !-r "$module_config_directory/site") { + $site{'modules'} = join(" ", @mods); + &write_file("$module_config_directory/site", \%site); + } } }