diff --git a/cron.php b/cron.php index e15d51a..bc6ff35 100644 --- a/cron.php +++ b/cron.php @@ -82,6 +82,8 @@ if ($actions->connect()) { foreach ($deals_to_backup as $deal_to_backup) { if (!file_exists(BACKUP_DEALS_DIR.'/'.$deal_to_backup->getId())) { rename(EXISTING_DEALS_DIR . '/' . $deal_to_backup->getId(), BACKUP_DEALS_DIR . '/' . $deal_to_backup->getId()); + } else { + delete_folder(EXISTING_DEALS_DIR . '/' . $deal_to_backup->getId()); } }