This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
Commit aa27c135 authored by Daniel Crazzolara's avatar Daniel Crazzolara
Browse files

Removed unnecessary folder on temp Zip creation

parent 4fbc1582
2 merge requests!188Merging Peer Reviewing et. al to Master,!164211 peer reviewing functionality
......@@ -217,7 +217,7 @@ public class ExerciseService {
}
/**
* Used to temporary store content of Zip-File into a tmp-subdirectory
* Used to temporary store content of Artemis' exercises Zip-Files into a tmp-subdirectory
*
* Recursion is used in case of nested Zip-Files
*
......@@ -246,7 +246,7 @@ public class ExerciseService {
writeFile(zipEntryPath.toFile(), zipInputStream);
String newSubDir;
if (StringUtils.endsWithAny(zipEntry.getName(), new String[] { "-exercise.zip", "-solution.zip", "-tests.zip" })) {
newSubDir = Paths.get(targetDir.toString(), getRepoNameFromZipEntry(zipEntry)).toString();
newSubDir = Paths.get(targetDir.getParent().toString(), getRepoNameFromZipEntry(zipEntry)).toString();
} else {
newSubDir =
Paths.get(targetDir.toString(), zipEntry.getName().substring(0, zipEntry.getName().lastIndexOf("."))).toString();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment