From 162987131b179c9eee10a6ad67f713c2c70fc3d0 Mon Sep 17 00:00:00 2001 From: Shikiryu Date: Wed, 8 Nov 2017 22:17:51 +0100 Subject: [PATCH] =?UTF-8?q?:fire:=20Fait=20le=20m=C3=A9nage=20des=20deals?= =?UTF-8?q?=20supprim=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cron.php | 2 ++ 1 file changed, 2 insertions(+) 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()); } }