From aea691678fee5591c554915b110a6eae64f507da Mon Sep 17 00:00:00 2001 From: wrushton Date: Wed, 25 Mar 2026 17:52:46 +1300 Subject: [PATCH] Changed the config backups to have the date appended to the name opposed to .bak --- src/main/ConfigManager.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/ConfigManager.java b/src/main/ConfigManager.java index 625aa4c..f0a8e1d 100644 --- a/src/main/ConfigManager.java +++ b/src/main/ConfigManager.java @@ -1,5 +1,7 @@ package src.main; +import java.time.LocalDate; + import java.util.AbstractMap; import java.util.HashMap; import java.util.List; @@ -109,7 +111,7 @@ public class ConfigManager { // Copy the file to the backup directory, replacing existing ones for(Path filePath : fileList) { - String newFileName = filePath.getFileName().toString() + ".bak"; + String newFileName = filePath.getFileName().toString() + LocalDate.now(); System.out.println(newFileName); System.out.println(Path.of(destination.toString(), newFileName).toString()); Files.copy(filePath, Path.of(destination.toString(), newFileName), StandardCopyOption.REPLACE_EXISTING);