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

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

Fixed problem with missing directories

parent ae882025
2 merge requests!110HotFix Artemis,!109Bugfix: Fix Sharing import/export with Artemis
......@@ -312,6 +312,10 @@ public class ExerciseService {
private void writeFile(File entryFile, ZipInputStream zipInputStream) throws IOException {
byte[] buffer = new byte[1024];
if (!entryFile.getParentFile().exists()) {
Files.createDirectories(entryFile.getParentFile().toPath());
}
try (FileOutputStream fos = new FileOutputStream(entryFile)) {
int len;
while ((len = zipInputStream.read(buffer)) > 0) {
......
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