From 232f7340f0c9e44fcf1b681506224ff46b87854d Mon Sep 17 00:00:00 2001 From: HorizonCode Date: Thu, 30 Jun 2022 16:32:24 +0200 Subject: [PATCH] delete sqlfile on exit --- .../net/horizoncode/sysbackup/tasks/impl/DatabaseTask.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/horizoncode/sysbackup/tasks/impl/DatabaseTask.java b/src/main/java/net/horizoncode/sysbackup/tasks/impl/DatabaseTask.java index 3fe9542..f5a9ac4 100644 --- a/src/main/java/net/horizoncode/sysbackup/tasks/impl/DatabaseTask.java +++ b/src/main/java/net/horizoncode/sysbackup/tasks/impl/DatabaseTask.java @@ -106,11 +106,11 @@ public class DatabaseTask extends Task { pb.stepTo(progressMonitor.getTotalWork()); } catch (Exception exception) { exception.printStackTrace(); - FileUtils.deleteQuietly(outputSQLFile); + outputSQLFile.deleteOnExit(); onDone(); } progressMonitor.endProgressMonitor(); - FileUtils.deleteQuietly(outputSQLFile); + outputSQLFile.deleteOnExit(); onDone(); } catch (Exception ex) { ex.printStackTrace();