Fix db history when adding new db (#9022)

Fixes https://github.com/keepassxreboot/keepassxc/issues/8375
This commit is contained in:
Dmytro 2023-01-29 06:24:10 -08:00 committed by GitHub
parent 93831f64a3
commit 8846880015
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 44 additions and 1 deletions

View file

@ -275,8 +275,8 @@ bool Database::saveAs(const QString& filePath, SaveAction action, const QString&
bool isNewFile = !QFile::exists(realFilePath);
bool ok = AsyncTask::runAndWaitForFuture([&] { return performSave(realFilePath, action, backupFilePath, error); });
if (ok) {
markAsClean();
setFilePath(filePath);
markAsClean();
if (isNewFile) {
QFile::setPermissions(realFilePath, QFile::ReadUser | QFile::WriteUser);
}