🔒 Vérifie si le dossier existe

This commit is contained in:
Shikiryu 2017-11-08 20:39:39 +01:00
parent 0353fe68cc
commit 2bb5bb7b5b

View File

@ -80,8 +80,10 @@ if ($actions->connect()) {
// Backup
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());
}
}
// Creation
foreach (new DirectoryIterator(NEW_DEALS_DIR) as $new_deal) {