1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Fix possible profile corruption

When loading an encrypted profile, not entering the password and switching directly to a plaintext profile could have overwritten the plaintext profile with the encrypted one
This commit is contained in:
tux3 2015-04-24 18:54:52 +02:00
parent 13d98da1bc
commit 73bd5a656f
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

View File

@ -913,9 +913,9 @@ QByteArray Core::loadToxSave(QString path)
if (!profile.isEmpty())
{
loadPath = QDir(Settings::getSettingsDirPath()).filePath(profile + TOX_EXT);
Settings::getInstance().switchProfile(profile);
HistoryKeeper::resetInstance();
return loadToxSave(QDir(Settings::getSettingsDirPath()).filePath(profile + TOX_EXT));
}
return QByteArray();
}