Skip to content

Commit

Permalink
bm-upload : Fix ftp_clean_directory for FTPS
Browse files Browse the repository at this point in the history
The list method failed for FTPS.
The ls command works well for that purpose.
  • Loading branch information
nat93-dev authored Jan 18, 2021
1 parent 90b5f71 commit 8fc9e79
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions backup-manager-upload
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
Expand Down

0 comments on commit 8fc9e79

Please sign in to comment.