mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-27 00:09:53 -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
|
||||
if (QFile::exists(backupFilePath)) {
|
||||
QFile::remove(filePath);
|
||||
return QFile::copy(backupFilePath, filePath);
|
||||
QFile::setPermissions(filePath, perms);
|
||||
if (QFile::copy(backupFilePath, filePath)) {
|
||||
return QFile::setPermissions(filePath, perms);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user