mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-08 14:32:39 -04:00
Correct behaviors when saving database fails
* Mark database dirty if saving fails * Restore database file from backup if unsafe save fails between deleting database file and copying temporary file into place * Improve error message display for opening and saving database files * Do not automatically retry saving after failure. This prevents deletion of the backup database file and improves user awareness of issues.
This commit is contained in:
parent
ec82931573
commit
3b0b5d85e9
7 changed files with 50 additions and 12 deletions
|
@ -144,7 +144,7 @@ signals:
|
|||
|
||||
public slots:
|
||||
bool lock();
|
||||
bool save(int attempt = 0);
|
||||
bool save();
|
||||
bool saveAs();
|
||||
|
||||
void replaceDatabase(QSharedPointer<Database> db);
|
||||
|
@ -255,6 +255,8 @@ private:
|
|||
QUuid m_groupBeforeLock;
|
||||
QUuid m_entryBeforeLock;
|
||||
|
||||
int m_saveAttempts;
|
||||
|
||||
// Search state
|
||||
EntrySearcher* m_EntrySearcher;
|
||||
QString m_lastSearchText;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue