Skip to content

Commit d1f3f9e

Browse files
committed
fix: backup creation flow
1 parent d739d23 commit d1f3f9e

File tree

2 files changed

+2
-30
lines changed

2 files changed

+2
-30
lines changed

src/main/java/backupmanager/Dialogs/BackupEntryDialog.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,8 @@ public void SingleBackup(String path1, String path2, BackupTable backupTable) {
211211
}
212212

213213
private boolean toggleAutomaticBackup() {
214-
if (currentBackup == null) {
215-
currentBackup = getBackup();
216-
currentBackup.setAutoBackup(!currentBackup.isAutoBackup());
217-
}
214+
currentBackup = getBackup();
215+
currentBackup.setAutoBackup(!currentBackup.isAutoBackup());
218216

219217
Backup backup = BackupManager.toggleAutomaticBackup(currentBackup);
220218

src/main/resources/res/backup_list2.0.5.json

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -190,31 +190,5 @@
190190
"last_update_date": "2025-02-08T00:40:13.396135900",
191191
"backup_count": 9,
192192
"max_backups_to_keep": 1
193-
},
194-
{
195-
"backup_name": "test",
196-
"start_path": "C:\\Users\\Utente\\Desktop\\mamma",
197-
"destination_path": "C:\\Users\\Utente\\Desktop",
198-
"automatic_backup": true,
199-
"next_date_backup": "2025-02-10T14:52:19.724042800",
200-
"time_interval_backup": "2.0:0",
201-
"notes": "",
202-
"creation_date": "2025-02-08T14:52:07.870091900",
203-
"last_update_date": "2025-02-08T14:52:19.724042800",
204-
"backup_count": 0,
205-
"max_backups_to_keep": 1
206-
},
207-
{
208-
"backup_name": "culo",
209-
"start_path": "C:\\Users\\Utente\\Desktop\\mamma",
210-
"destination_path": "C:\\Users\\Utente\\Desktop",
211-
"automatic_backup": true,
212-
"next_date_backup": "2025-02-10T14:52:24.135406700",
213-
"time_interval_backup": "2.0:0",
214-
"notes": "",
215-
"creation_date": "2025-02-08T14:52:07.870091900",
216-
"last_update_date": "2025-02-08T14:52:25.638810200",
217-
"backup_count": 0,
218-
"max_backups_to_keep": 1
219193
}
220194
]

0 commit comments

Comments
 (0)