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

Create avatars directory on the fly

This commit is contained in:
tux3 2015-12-05 22:01:36 +01:00
parent 2396109a7e
commit 45ac45c019
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

View File

@ -385,6 +385,7 @@ void Profile::saveAvatar(QByteArray pic, const QString &ownerId)
pic = core->encryptData(pic, passkey);
QString path = avatarPath(ownerId);
QDir(Settings::getInstance().getSettingsDirPath()).mkdir("avatars");
QSaveFile file(path);
if (!file.open(QIODevice::WriteOnly))
{