10.1 warning création dossier existant

This commit is contained in:
Fred Tempez 2020-05-22 16:13:38 +02:00
parent 24f8267ac8
commit 50b4efd6bd
1 changed files with 3 additions and 1 deletions

View File

@ -659,7 +659,9 @@ class theme extends common {
// Make zip
$zipFilename = $this->makezip($this->getUrl(2));
// Téléchargement du ZIP
mkdir(self::FILE_DIR.'source/theme');
if (!is_dir(self::FILE_DIR.'source/theme')) {
mkdir(self::FILE_DIR.'source/theme');
}
copy (self::TEMP_DIR . $zipFilename , self::FILE_DIR.'source/theme/' . $zipFilename);
// Nettoyage du dossier
unlink (self::TEMP_DIR . $zipFilename);