Commit 58dd547c authored by brabox's avatar brabox

Fixed Issue #301

Made the launcher find the %appdata% directory (a bit) cleaner
parent b7656383
......@@ -85,9 +85,14 @@ void ResTool::ApplyResolutionToFile()
//~ QDir confDirOptionA = QDir::homePath() + "Application Data" +
//~ QDir appData = QDir(QString(confDir.absolutePath()) + "/../../Roaming");
// Here's the file I'm after
QString optionsFile = QString(QDir::homePath()) + "/Application Data/My The Lord of the Rings, The Rise of the Witch-King Files/Options.ini";
QString optionsFileB = QString(QDir::homePath()) + "/Application Data/Roaming/My The Lord of the Rings, The Rise of the Witch-King Files/Options.ini";
// This is a non-existent config file used to grab the "%appdata%/organization" folder on Windows.
QSettings cfg(QSettings::IniFormat, QSettings::UserScope, "organization", "application");
//strip the "/organization"
QString config_dir = QFileInfo(cfg.fileName()).absolutePath() + "/../";
QDir myDir = QDir(config_dir);
QString optionsFile = myDir.absolutePath() + "/My The Lord of the Rings, The Rise of the Witch-King Files/Options.ini";
QString optionsFileB = myDir.absolutePath() + "/Roaming/My The Lord of the Rings, The Rise of the Witch-King Files/Options.ini";
QFile opts(optionsFile);
QFile optsB(optionsFileB);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment