1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 09:42:10 +02:00

Structure of browsingdata.db has not been changes from 0.9.6 to 0.9.7,

so we won't rewrite user's saved data.
This commit is contained in:
nowrep 2011-03-04 20:22:20 +01:00
parent 544e2f3f2e
commit 62453f515a

View File

@ -526,14 +526,16 @@ bool MainApplication::checkProfileDir()
QString homePath = QDir::homePath(); QString homePath = QDir::homePath();
homePath+="/.qupzilla/"; homePath+="/.qupzilla/";
QByteArray rData;
if (QDir(homePath).exists()) { if (QDir(homePath).exists()) {
QFile versionFile(homePath+"version"); QFile versionFile(homePath+"version");
versionFile.open(QFile::ReadOnly); versionFile.open(QFile::ReadOnly);
if (versionFile.readAll().contains(QupZilla::VERSION.toAscii())) { rData = versionFile.readAll();
if (rData.contains(QupZilla::VERSION.toAscii())) {
versionFile.close(); versionFile.close();
return true; return true;
} }
versionFile.close(); versionFile.close();
#ifdef DEVELOPING #ifdef DEVELOPING
return true; return true;
#endif #endif
@ -552,6 +554,9 @@ bool MainApplication::checkProfileDir()
versionFile.write(QupZilla::VERSION.toAscii()); versionFile.write(QupZilla::VERSION.toAscii());
versionFile.close(); versionFile.close();
if (rData.contains("0.9.6")) // Data not changed from this version
return true;
dir.mkdir("profiles"); dir.mkdir("profiles");
dir.cd("profiles"); dir.cd("profiles");