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

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

Another try

parent 924e46d9
2 merge requests!188Merging Peer Reviewing et. al to Master,!164211 peer reviewing functionality
......@@ -89,6 +89,7 @@ public class ExerciseService {
}
gitlabService.commitAndPushToRepo(repo, new File("tmp-import", exerciseToken));
repo.close();
try {
FileUtils.deleteDirectory(new File("tmp-import", exerciseToken));
} catch (IOException e) {
......
......@@ -252,12 +252,8 @@ public class GitlabService {
FileUtils.deleteDirectory(dst);
} catch (IOException e) {
log.error("Unable to remove directory. Trying to rename it.. : {} \n", e.getMessage());
try {
if (dst.renameTo(new File("delete_me", dst.getName()))) {
log.error("Unable to rename directory. Trying to overwrite it..");
}
} catch (SecurityException se) {
log.error("Unable to rename directory. Trying to overwrite it.. : {}", se.getMessage());
if (!dst.renameTo(new File("delete_me", dst.getName()))) {
log.error("Unable to rename directory.");
}
}
}
......
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