Skip to content

Commit ffed0cc

Browse files
committed
#2270 wip
1 parent a4e2b86 commit ffed0cc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/stirling/software/SPDF/config/security/database/DatabaseBackupHelper.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public class DatabaseBackupHelper implements DatabaseBackupInterface {
4242

4343
private Path backupPath = Paths.get("configs/db/backup/");
4444

45+
// fixMe: should check if backups exist without returning the whole list
4546
@Override
4647
public boolean hasBackup() {
4748
// Check if there is at least one backup
@@ -51,6 +52,7 @@ public boolean hasBackup() {
5152
@Override
5253
public List<FileInfo> getBackupList() {
5354
// Check if the backup directory exists, and create it if it does not
55+
// todo: as this should always exist, can we make this an 'init' method so we do not have to check all the time?
5456
ensureBackupDirectoryExists();
5557

5658
List<FileInfo> backupFiles = new ArrayList<>();
@@ -92,6 +94,7 @@ public boolean importDatabaseFromUI(String fileName) throws IOException {
9294
}
9395

9496
// Imports a database backup from the specified path.
97+
// todo: make private?
9598
public boolean importDatabaseFromUI(Path tempTemplatePath) throws IOException {
9699
boolean success = executeDatabaseScript(tempTemplatePath);
97100
if (success) {

0 commit comments

Comments
 (0)