Skip to content

Commit 38f9652

Browse files
author
Nathan Merrill
committed
Fixed bug in downloader using the name of the submission as the name of the language
1 parent 3c7bf2a commit 38f9652

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/main/java/com/nmerrill/kothcomm/communication/Downloader.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,16 @@ private void saveSubmission(String html){
6868
return;
6969
}
7070
String[] parts = header.split(",");
71-
String name = parts[0];
7271
String language = parts.length < 2 ? "" : parts[1];
7372
List<Element> codeBlocks = document.select("pre>code");
7473
if (codeBlocks.size() == 0){
7574
System.out.println("No code blocks in submission:"+header);
7675
return;
7776
}
7877

79-
Language loader = languageLoader.byName(name);
78+
Language loader = languageLoader.byName(language);
8079
if (loader == null){
81-
System.out.println("Cannot find a language with the name "+name);
80+
System.out.println("Cannot find a language with the name "+language);
8281
}
8382
File directory = languageLoader.getDirectory(loader);
8483

0 commit comments

Comments
 (0)