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

Create config directory on first run

Fixes #1540
This commit is contained in:
tux3 2015-04-27 02:48:16 +02:00
parent f0c01a4f64
commit 92f14cc6eb
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

View File

@ -169,6 +169,10 @@ void Settings::load()
if (loaded)
return;
QDir dir(getSettingsDirPath());
if (!dir.exists())
dir.mkpath(".");
if (QFile(FILENAME).exists())
{
QSettings ps(FILENAME, QSettings::IniFormat);
@ -188,7 +192,6 @@ void Settings::load()
makeToxPortable = false;
}
QDir dir(getSettingsDirPath());
QString filePath = dir.filePath(FILENAME);
//if no settings file exist -- use the default one