From 00401080e05583d7f07759cdea2451e9c8ae5662 Mon Sep 17 00:00:00 2001 From: CalDescent Date: Sat, 9 Oct 2021 13:02:00 +0100 Subject: [PATCH] Simplified cleanup process. Individual deletions aren't needed as they are all inside the main temp directory. --- .../java/org/qortal/repository/Bootstrap.java | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/main/java/org/qortal/repository/Bootstrap.java b/src/main/java/org/qortal/repository/Bootstrap.java index c3beab9e..3b10ce0d 100644 --- a/src/main/java/org/qortal/repository/Bootstrap.java +++ b/src/main/java/org/qortal/repository/Bootstrap.java @@ -293,18 +293,7 @@ public class Bootstrap { // Cleanup LOGGER.info("Cleaning up..."); - try { - if (inputPath != null) { - FileUtils.deleteDirectory(inputPath.toFile()); - } - if (outputPath != null) { - FileUtils.deleteDirectory(outputPath.toFile()); - } - this.deleteAllTempDirectories(); - - } catch (IOException e) { - LOGGER.info("Error during cleanup, but created bootstrap is still valid. {}", e); - } + this.deleteAllTempDirectories(); } } @@ -488,7 +477,7 @@ public class Bootstrap { try { FileUtils.deleteDirectory(path.toFile()); } catch (IOException e) { - LOGGER.info("Unable to delete temp directory path: {}", path.toString()); + LOGGER.info("Unable to delete temp directory path: {}", path.toString(), e); } }