diff --git a/backup/util/helper/backup_cron_helper.class.php b/backup/util/helper/backup_cron_helper.class.php index f8d14737d3c..42a5bf53399 100644 --- a/backup/util/helper/backup_cron_helper.class.php +++ b/backup/util/helper/backup_cron_helper.class.php @@ -461,6 +461,11 @@ abstract class backup_cron_automated_helper { $storage = $config->backup_auto_storage; $dir = $config->backup_auto_destination; + if ($keep == 0) { + // means keep all backup files + return true; + } + $backupword = str_replace(' ', '_', moodle_strtolower(get_string('backupfilename'))); $backupword = trim(clean_filename($backupword), '_');