From 2bbbcf26bdcf2bf1869fee9922d885c7b25ba654 Mon Sep 17 00:00:00 2001 From: Jacob Bachmeyer Date: Wed, 24 Mar 2021 20:26:39 -0500 Subject: [PATCH] Avoid running generate-ftpindex during tests The attempt to rebuild the FTP server index is normally harmless, since most test machines will not actually have /usr/local/bin/generate-ftpindex and the error from the inability to execute that tool is ignored anyway. However, if the testsuite is ever actually run on the FTP upload server, this will prevent a large amount of spurious work rebuilding the FTP indexes. --- upload-ftp-v1.2.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upload-ftp-v1.2.pl b/upload-ftp-v1.2.pl index 49a8c45..0e6e9de 100755 --- a/upload-ftp-v1.2.pl +++ b/upload-ftp-v1.2.pl @@ -351,7 +351,7 @@ sub main ftp_syslog('info', "($log_style) No files found for processing."); } else { ftp_syslog('info', "($log_style) Processing complete: " . (scalar @incoming) . " uploads processed."); - system("/usr/local/bin/generate-ftpindex"); + system("/usr/local/bin/generate-ftpindex") unless IN_TEST_MODE; ftp_syslog('info', "($log_style) Updated ftpindex"); } -- 2.25.1