From 1c7288204c683fbd1b63cbd4629bfc73438036d9 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Wed, 31 Jan 2018 19:12:19 +0100 Subject: [PATCH] ProfileManager: Never allow to use session from newer profile version Always make a backup instead of possibly corrupting it. --- src/lib/app/profilemanager.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib/app/profilemanager.cpp b/src/lib/app/profilemanager.cpp index 73ff400f1..a8535ac6a 100644 --- a/src/lib/app/profilemanager.cpp +++ b/src/lib/app/profilemanager.cpp @@ -20,7 +20,6 @@ #include "datapaths.h" #include "updater.h" #include "qztools.h" -#include "restoremanager.h" #include "sqldatabase.h" #include @@ -226,7 +225,7 @@ void ProfileManager::copyDataToProfile() } QFile sessionFile(profileDir.filePath(QSL("session.dat"))); - if (sessionFile.exists() && !RestoreManager::validateFile(sessionFile.fileName())) { + if (sessionFile.exists()) { QString oldVersion = QzTools::readAllFileContents(profileDir.filePath(QSL("version"))).trimmed(); if (oldVersion.isEmpty()) { oldVersion = QSL("unknown-version");