Skip to content

Commit

Permalink
Fix: Deleting all backups
Browse files Browse the repository at this point in the history
  • Loading branch information
machiav3lli committed Feb 27, 2025
1 parent 2a63edf commit 7ca97f5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/com/machiav3lli/backup/data/entity/Package.kt
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,10 @@ data class Package private constructor(val packageName: String) {

fun deleteAllBackups() {
val backups = backupsNewestFirst.toMutableList()
backups.removeLastOrNull()?.let { backup ->
_deleteBackup(backup)
while (backups.isNotEmpty()) {
backups.removeLastOrNull()?.let { backup ->
_deleteBackup(backup)
}
}
if (pref_paranoidBackupLists.value)
runOrLog { refreshBackupList() } // get real state of file system only once
Expand Down

0 comments on commit 7ca97f5

Please sign in to comment.