From 8715746774b0cb8df8bac34920ffee742d48bf66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Fri, 22 May 2015 01:27:59 +0200 Subject: GH-977 this isn't funny anymore... --- logic/ftb/FTBPlugin.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'logic/ftb') diff --git a/logic/ftb/FTBPlugin.cpp b/logic/ftb/FTBPlugin.cpp index 2f294b01..87b9d38a 100644 --- a/logic/ftb/FTBPlugin.cpp +++ b/logic/ftb/FTBPlugin.cpp @@ -35,7 +35,7 @@ inline uint qHash(FTBRecord record) QSet discoverFTBInstances(SettingsObjectPtr globalSettings) { QSet records; - QDir dir = QDir(globalSettings->get("FTBLauncherDataRoot").toString()); + QDir dir = QDir(globalSettings->get("FTBLauncherLocal").toString()); QDir dataDir = QDir(globalSettings->get("FTBRoot").toString()); if (!dataDir.exists()) { @@ -269,7 +269,7 @@ void FTBPlugin::loadInstances(SettingsObjectPtr globalSettings, QMapregisterSetting("TrackFTBInstances", false); - QString ftbDataDefault = getDynamicStorageLocation(); - QString ftbDefault = getCacheStorageLocation(); + QString ftbRoaming = getRoamingStorageLocation(); + QString ftbLocal = getLocalCacheStorageLocation(); - globalSettings->registerSetting("FTBLauncherDataRoot", ftbDataDefault); - globalSettings->registerSetting("FTBLauncherRoot", ftbDefault); - qDebug() << "FTB Launcher paths:" << globalSettings->get("FTBLauncherDataRoot").toString() - << "and" << globalSettings->get("FTBLauncherRoot").toString(); + globalSettings->registerSetting("FTBLauncherRoaming", ftbRoaming); + globalSettings->registerSetting("FTBLauncherLocal", ftbLocal); + qDebug() << "FTB Launcher paths:" << globalSettings->get("FTBLauncherRoaming").toString() + << "and" << globalSettings->get("FTBLauncherLocal").toString(); globalSettings->registerSetting("FTBRoot"); if (globalSettings->get("FTBRoot").isNull()) { QString ftbRoot; - QFile f(QDir(globalSettings->get("FTBLauncherRoot").toString()) - .absoluteFilePath("ftblaunch.cfg")); + QFile f(QDir(globalSettings->get("FTBLauncherRoaming").toString()).absoluteFilePath("ftblaunch.cfg")); qDebug() << "Attempting to read" << f.fileName(); if (f.open(QFile::ReadOnly)) { -- cgit v1.2.3