mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-28 08:49:42 -05:00
parent
ee92b980bb
commit
e1c8304c4b
@ -486,8 +486,9 @@ bool Database::restoreDatabase(const QString& filePath)
|
|||||||
// Only try to restore if the backup file actually exists
|
// Only try to restore if the backup file actually exists
|
||||||
if (QFile::exists(backupFilePath)) {
|
if (QFile::exists(backupFilePath)) {
|
||||||
QFile::remove(filePath);
|
QFile::remove(filePath);
|
||||||
return QFile::copy(backupFilePath, filePath);
|
if (QFile::copy(backupFilePath, filePath)) {
|
||||||
QFile::setPermissions(filePath, perms);
|
return QFile::setPermissions(filePath, perms);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user