Changed the config backups to have the date appended to the name opposed to .bak

This commit is contained in:
2026-03-25 17:52:46 +13:00
parent 0ace682674
commit aea691678f

View File

@@ -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);