Add _sy to the backup name
This commit is contained in:
parent
5a2f81c9db
commit
62446a0737
@ -130,7 +130,9 @@ class BackupManager(
|
|||||||
|
|
||||||
// Delete older backups
|
// Delete older backups
|
||||||
val numberOfBackups = backupPreferences.numberOfBackups().get()
|
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) }
|
dir.listFiles { _, filename -> backupRegex.matches(filename) }
|
||||||
.orEmpty()
|
.orEmpty()
|
||||||
.sortedByDescending { it.name }
|
.sortedByDescending { it.name }
|
||||||
|
@ -20,7 +20,7 @@ data class Backup(
|
|||||||
companion object {
|
companion object {
|
||||||
fun getBackupFilename(): String {
|
fun getBackupFilename(): String {
|
||||||
val date = SimpleDateFormat("yyyy-MM-dd_HH-mm", Locale.getDefault()).format(Date())
|
val date = SimpleDateFormat("yyyy-MM-dd_HH-mm", Locale.getDefault()).format(Date())
|
||||||
return "tachiyomi_$date.proto.gz"
|
return "tachiyomi_sy_$date.proto.gz"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user