From 8fc9e79e89c10b9ca5fd9f8fe40d09dff64ae3aa Mon Sep 17 00:00:00 2001 From: nat93 Date: Mon, 18 Jan 2021 23:19:24 +0100 Subject: [PATCH] bm-upload : Fix ftp_clean_directory for FTPS The list method failed for FTPS. The ls command works well for that purpose. --- backup-manager-upload | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/backup-manager-upload b/backup-manager-upload index 33636fd..e9faa43 100755 --- a/backup-manager-upload +++ b/backup-manager-upload @@ -527,12 +527,8 @@ sub ftp_clean_directory($) my ($fh, $filename) = get_tempfile('ftp-archives-XXXXXX'); my $BM_UPLOAD_FTP_SECURE = $ENV{"BM_UPLOAD_FTP_SECURE"}; my $ra_files; - if ($BM_UPLOAD_FTP_SECURE eq "true") { - $ra_files = $ftp->list(); - } - else { - $ra_files = $ftp->ls(); - } + $ra_files = $ftp->ls(); + foreach my $file (@$ra_files) { print $fh "$file\n"; }