File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
src/main/java/stirling/software/SPDF/config/security/database Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ public class DatabaseBackupHelper implements DatabaseBackupInterface {
42
42
43
43
private Path backupPath = Paths .get ("configs/db/backup/" );
44
44
45
+ // fixMe: should check if backups exist without returning the whole list
45
46
@ Override
46
47
public boolean hasBackup () {
47
48
// Check if there is at least one backup
@@ -51,6 +52,7 @@ public boolean hasBackup() {
51
52
@ Override
52
53
public List <FileInfo > getBackupList () {
53
54
// 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?
54
56
ensureBackupDirectoryExists ();
55
57
56
58
List <FileInfo > backupFiles = new ArrayList <>();
@@ -92,6 +94,7 @@ public boolean importDatabaseFromUI(String fileName) throws IOException {
92
94
}
93
95
94
96
// Imports a database backup from the specified path.
97
+ // todo: make private?
95
98
public boolean importDatabaseFromUI (Path tempTemplatePath ) throws IOException {
96
99
boolean success = executeDatabaseScript (tempTemplatePath );
97
100
if (success ) {
You can’t perform that action at this time.
0 commit comments