mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-13 05:20:00 -08:00
[Installer][Client] Fix review findings: throttle backups, NSIS old dir, portable messaging
This commit is contained in:
parent
bb5f17b876
commit
f4e3d9acba
5 changed files with 255 additions and 49 deletions
|
|
@ -69,6 +69,30 @@ bool backupAtRiskPaths(const QStringList &sourcePaths,
|
|||
*/
|
||||
QString defaultBackupRoot();
|
||||
|
||||
/**
|
||||
* @brief Lists existing backup session directories under @p backupRoot, newest first.
|
||||
*/
|
||||
QStringList listBackupSessions(const QString &backupRoot);
|
||||
|
||||
/**
|
||||
* @brief Returns the newest session directory younger than @p maxAgeHours, or empty.
|
||||
*
|
||||
* Used to throttle startup safety backups so dismissing the warning without
|
||||
* "Don't show again" does not create a full duplicate on every launch.
|
||||
*/
|
||||
QString findRecentBackupSession(const QString &backupRoot, int maxAgeHours = 24);
|
||||
|
||||
/**
|
||||
* @brief Deletes oldest sessions keeping only the newest @p keepCount ones.
|
||||
*/
|
||||
void pruneOldBackupSessions(const QString &backupRoot, int keepCount = 5);
|
||||
|
||||
/**
|
||||
* @brief Lists the backup targets inside an existing session directory.
|
||||
* @returns absolute paths of the entries, for reuse messages without a new copy.
|
||||
*/
|
||||
QStringList listSessionBackupLocations(const QString &sessionDir);
|
||||
|
||||
} // namespace UserDataBackup
|
||||
|
||||
#endif // USER_DATA_BACKUP_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue