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:
@@ -150,7 +150,8 @@ void DatabaseTabWidget::addDatabaseTab(const QString& filePath,
|
||||
QFileInfo fileInfo(filePath);
|
||||
QString canonicalFilePath = fileInfo.canonicalFilePath();
|
||||
if (canonicalFilePath.isEmpty()) {
|
||||
emit messageGlobal(tr("The database file does not exist or is not accessible."), MessageWidget::Error);
|
||||
emit messageGlobal(tr("Failed to open %1. It either does not exist or is not accessible.").arg(filePath),
|
||||
MessageWidget::Error);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user