mirror of
https://invent.kde.org/network/falkon.git
synced 2024-09-21 09:42:10 +02:00
ProfileManager: Never allow to use session from newer profile version
Always make a backup instead of possibly corrupting it.
This commit is contained in:
parent
4124c67c5f
commit
1c7288204c
|
@ -20,7 +20,6 @@
|
|||
#include "datapaths.h"
|
||||
#include "updater.h"
|
||||
#include "qztools.h"
|
||||
#include "restoremanager.h"
|
||||
#include "sqldatabase.h"
|
||||
|
||||
#include <QDir>
|
||||
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue
Block a user