incorrect path
authorLiana.Bakradze <liana.bakradze@jetbrains.com>
Fri, 28 Oct 2016 13:53:26 +0000 (16:53 +0300)
committerliana.bakradze <liana.bakradze@jetbrains.com>
Thu, 17 Nov 2016 14:08:38 +0000 (17:08 +0300)
python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/CCCreateCourseArchive.java

index c8efdd55af3b4d1fa3c42d6219ab7966dd48be0a..526cba9c2eda170310874c0634a285753ee8a487 100644 (file)
@@ -117,13 +117,14 @@ public class CCCreateCourseArchive extends DumbAwareAction {
 
       private void replaceAnswerFilesWithTaskFiles(Course courseCopy) {
         for (Lesson lesson : courseCopy.getLessons()) {
-          final VirtualFile lessonDir = baseDir.findChild(EduNames.LESSON + String.valueOf(lesson.getIndex()));
+          String lessonDirName = EduNames.LESSON + String.valueOf(lesson.getIndex());
+          final VirtualFile lessonDir = baseDir.findChild(lessonDirName);
           if (lessonDir == null) continue;
           for (Task task : lesson.getTaskList()) {
             final VirtualFile taskDir = task.getTaskDir(project);
             if (taskDir == null) continue;
             String taskDirName = EduNames.TASK + String.valueOf(task.getIndex());
-            VirtualFile studentFileDir = VfsUtil.findRelativeFile(archiveFolder, lessonDir.getName(), taskDirName);
+            VirtualFile studentFileDir = VfsUtil.findRelativeFile(archiveFolder, lessonDirName, taskDirName);
             if (studentFileDir == null) {
               continue;
             }