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:
parent
13d98da1bc
commit
73bd5a656f
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user