Browse Source

Merge branch '1.11.x' of github.com:chamilo/chamilo-lms into 1.11.x

Angel Fernando Quiroz Campos 8 years ago
parent
commit
3fb6d22192
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);