diff --git a/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/util/Util.java b/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/util/Util.java index aad3f7ec01..eb10ca5ca1 100644 --- a/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/util/Util.java +++ b/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/util/Util.java @@ -131,6 +131,11 @@ public class Util { t.printStackTrace(); } + public static void deleteDirectory(File directory) { + deleteInDirectory(directory); + directory.delete(); + } + public static void deleteInDirectory(File directory) { deleteInDirectoryApartFrom(directory); } diff --git a/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/writelatex/CandidateSnapshot.java b/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/writelatex/CandidateSnapshot.java index 8f2252f322..f40d56afb9 100644 --- a/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/writelatex/CandidateSnapshot.java +++ b/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/writelatex/CandidateSnapshot.java @@ -67,7 +67,7 @@ public class CandidateSnapshot { public void deleteServletFiles() throws IOException { if (attsDirectory != null) { - Util.deleteInDirectory(attsDirectory); + Util.deleteDirectory(attsDirectory); } }