Browse Source

Fix issue uploading imported courses files

Yannick Warnier 8 years ago
parent
commit
12bf1243ae
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/Chamilo/CourseBundle/Component/CourseCopy/CourseArchiver.php

+ 4 - 0
src/Chamilo/CourseBundle/Component/CourseCopy/CourseArchiver.php

@@ -206,6 +206,10 @@ class CourseArchiver
     {
         $new_filename = uniqid('') . '.zip';
         $new_dir = self::getBackupDir();
+        if (!is_dir($new_dir)) {
+            $fs = new Filesystem();
+            $fs->mkdir($new_dir);
+        }
         if (is_dir($new_dir) && is_writable($new_dir)) {
             move_uploaded_file($file, $new_dir.$new_filename);