EDU-532 Add custom folders to course
authorLiana Bakradze <liana.bakradze@jetbrains.com>
Thu, 11 Feb 2016 12:30:23 +0000 (15:30 +0300)
committerLiana Bakradze <liana.bakradze@jetbrains.com>
Thu, 11 Feb 2016 12:32:04 +0000 (15:32 +0300)
python/educational-core/student/src/com/jetbrains/edu/learning/courseGeneration/StudyGenerator.java

index f3b5b41c69bf8518573e12091f0fbb338cade876..4d04f8e0bb3dc6d0c29752adfe58534135257b73 100644 (file)
@@ -122,7 +122,14 @@ public class StudyGenerator {
                   }
                 });
                 for (File file : files) {
-                  FileUtil.copy(file, new File(baseDir.getPath(), file.getName()));
+                  File dir = new File(baseDir.getPath(), file.getName());
+                  if (file.isDirectory()) {
+                    FileUtil.copyDir(file, dir);
+                    continue;
+                  }
+
+                  FileUtil.copy(file, dir);
+
                 }
               }
               catch (IOException e) {