From e20d652cca359f34e6a6d0156b44579e875475b5 Mon Sep 17 00:00:00 2001 From: Jonathan White Date: Mon, 18 Mar 2019 16:01:16 -0400 Subject: [PATCH] Use existing extension when creating backup file * passwords.kdbx -> passwords.old.kdbx * passwords.db -> passwords.old.db * passwords -> passwords.old --- src/core/Database.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/core/Database.cpp b/src/core/Database.cpp index 94113546..649b4e65 100644 --- a/src/core/Database.cpp +++ b/src/core/Database.cpp @@ -304,16 +304,18 @@ bool Database::writeDatabase(QIODevice* device, QString* error) /** * Remove the old backup and replace it with a new one - * backups are named .old.kdbx + * backups are named .old. * * @param filePath Path to the file to backup * @return true on success */ bool Database::backupDatabase(const QString& filePath) { - QString backupFilePath = filePath; - auto re = QRegularExpression("\\.kdbx$|(?