From e1558d630085ac448db37044b4ed68f71f4cb96a Mon Sep 17 00:00:00 2001 From: Janek Bevendorff Date: Tue, 27 Feb 2018 15:28:12 +0100 Subject: [PATCH] Avoid double file extension replacement in backup filename --- src/core/Database.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/Database.cpp b/src/core/Database.cpp index a4d66313..94b41cdf 100644 --- a/src/core/Database.cpp +++ b/src/core/Database.cpp @@ -570,10 +570,11 @@ QString Database::writeDatabase(QIODevice* device) * @param filePath Path to the file to backup * @return */ + bool Database::backupDatabase(QString filePath) { QString backupFilePath = filePath; - auto re = QRegularExpression("(?:\\.kdbx)?$", QRegularExpression::CaseInsensitiveOption); + auto re = QRegularExpression("\\.kdbx$|(?