Browse Source

🔒 Vérifie si le dossier existe

master
Shikiryu 3 years ago
parent
commit
2bb5bb7b5b
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      cron.php

+ 3
- 1
cron.php View File

@ -80,7 +80,9 @@ if ($actions->connect()) {
// Backup
foreach ($deals_to_backup as $deal_to_backup) {
rename(EXISTING_DEALS_DIR.'/'.$deal_to_backup->getId(), BACKUP_DEALS_DIR.'/'.$deal_to_backup->getId());
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());
}
}
// Creation


Loading…
Cancel
Save