Skip to content

Commit

Permalink
feat: Added cmd command to delete old exec after Drifty exits
Browse files Browse the repository at this point in the history
  • Loading branch information
SaptarshiSarkar12 committed Feb 18, 2024
1 parent e439d4e commit ee36db0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions GUI/src/main/java/gui/updater/ExecuteUpdate.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ public void executeUpdate() {
}
try {
if (OS.isWindows()) {
ProcessBuilder sleepAndDelete = new ProcessBuilder("sleep", "2", "&&", "del", currentExecutablePathString + ".old");
sleepAndDelete.start();
new ProcBuilder("timeout", "5", "&&", "del", currentExecutablePathString + ".old").withNoTimeout().ignoreExitStatus().run();
} else {
Files.deleteIfExists(Paths.get(currentExecutablePathString + ".old"));
}
Expand Down

0 comments on commit ee36db0

Please sign in to comment.