Set permissions on the accounts.json file so other users can't access it.

This commit is contained in:
Petr Mrázek 2014-03-23 19:22:39 +01:00
parent 4a24ea6c38
commit 0e6bc97bf3

View File

@ -402,6 +402,7 @@ bool MojangAccountList::saveList(const QString &filePath)
// Write the JSON to the file. // Write the JSON to the file.
file.write(doc.toJson()); file.write(doc.toJson());
file.setPermissions(QFile::ReadOwner|QFile::WriteOwner|QFile::ReadUser|QFile::WriteUser);
file.close(); file.close();
QLOG_INFO() << "Saved account list to" << path; QLOG_INFO() << "Saved account list to" << path;