Add _sy to the backup name

This commit is contained in:
Jobobby04 2022-10-22 17:11:03 -04:00
parent 5a2f81c9db
commit 62446a0737
2 changed files with 4 additions and 2 deletions

View File

@ -130,7 +130,9 @@ class BackupManager(
// Delete older backups
val numberOfBackups = backupPreferences.numberOfBackups().get()
val backupRegex = Regex("""tachiyomi_\d+-\d+-\d+_\d+-\d+.proto.gz""")
// SY -->
val backupRegex = Regex("""tachiyomi(?:_sy)?_\d+-\d+-\d+_\d+-\d+.proto.gz""")
// SY <--
dir.listFiles { _, filename -> backupRegex.matches(filename) }
.orEmpty()
.sortedByDescending { it.name }

View File

@ -20,7 +20,7 @@ data class Backup(
companion object {
fun getBackupFilename(): String {
val date = SimpleDateFormat("yyyy-MM-dd_HH-mm", Locale.getDefault()).format(Date())
return "tachiyomi_$date.proto.gz"
return "tachiyomi_sy_$date.proto.gz"
}
}
}