Skip to content

Commit

Permalink
#2270 wip
Browse files Browse the repository at this point in the history
  • Loading branch information
DarioGii committed Dec 5, 2024
1 parent a4e2b86 commit ffed0cc
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public class DatabaseBackupHelper implements DatabaseBackupInterface {

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

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

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

// Imports a database backup from the specified path.
// todo: make private?
public boolean importDatabaseFromUI(Path tempTemplatePath) throws IOException {
boolean success = executeDatabaseScript(tempTemplatePath);
if (success) {
Expand Down

0 comments on commit ffed0cc

Please sign in to comment.