From: liana.bakradze Date: Wed, 3 Aug 2016 14:35:46 +0000 (+0300) Subject: fix migration to detect answer files without extension X-Git-Tag: dbe/163.2234~33 X-Git-Url: http://git.jetbrains.org/?p=idea%2Fcommunity.git;a=commitdiff_plain;h=6c28e88ee760073319ae741f4c3fef79a7a8ffae fix migration to detect answer files without extension --- diff --git a/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/CCProjectService.java b/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/CCProjectService.java index 59d67e6ca38d..b009d097b52a 100644 --- a/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/CCProjectService.java +++ b/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/CCProjectService.java @@ -84,7 +84,10 @@ public class CCProjectService implements PersistentStateComponent { String answerName = FileUtil.getNameWithoutExtension(name) + CCUtils.ANSWER_EXTENSION_DOTTED + FileUtilRt.getExtension(name); Document document = StudyUtils.getDocument(myProject.getBasePath(), lessonIndex, taskIndex, answerName); if (document == null) { - continue; + document = StudyUtils.getDocument(myProject.getBasePath(), lessonIndex, taskIndex, name); + if (document == null) { + continue; + } } for (Element placeholder : getChildList(taskFileElement, ANSWER_PLACEHOLDERS, true)) { Element lineElement = getChildWithName(placeholder, LINE, true);