summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Dalheimer <jan@dalheimer.de>2014-05-03 15:40:46 +0200
committerJan Dalheimer <jan@dalheimer.de>2014-05-03 15:40:46 +0200
commit0f3d88cb141bbfc5b66874f21649966ace1a5202 (patch)
tree3c99095fa2fc8a4fe400241557f86348c752bc33
parente9c8ca02ba2f151cb6aa6039b7726861eeae122a (diff)
downloadMultiMC-0f3d88cb141bbfc5b66874f21649966ace1a5202.tar
MultiMC-0f3d88cb141bbfc5b66874f21649966ace1a5202.tar.gz
MultiMC-0f3d88cb141bbfc5b66874f21649966ace1a5202.tar.lz
MultiMC-0f3d88cb141bbfc5b66874f21649966ace1a5202.tar.xz
MultiMC-0f3d88cb141bbfc5b66874f21649966ace1a5202.zip
Fix FTB local libraries bug
-rw-r--r--logic/OneSixLibrary.cpp11
-rw-r--r--logic/OneSixLibrary.h3
-rw-r--r--logic/OneSixUpdate.cpp2
3 files changed, 9 insertions, 7 deletions
diff --git a/logic/OneSixLibrary.cpp b/logic/OneSixLibrary.cpp
index 7032809d..45fa169e 100644
--- a/logic/OneSixLibrary.cpp
+++ b/logic/OneSixLibrary.cpp
@@ -148,22 +148,23 @@ QStringList OneSixLibrary::files()
{
QString cooked_storage = storage;
cooked_storage.replace("${arch}", "32");
- retval.append(PathCombine("libraries", cooked_storage));
+ retval.append(cooked_storage);
cooked_storage = storage;
cooked_storage.replace("${arch}", "64");
- retval.append(PathCombine("libraries", cooked_storage));
+ retval.append(cooked_storage);
}
else
- retval.append(PathCombine("libraries", storage));
+ retval.append(storage);
return retval;
}
-bool OneSixLibrary::filesExist()
+bool OneSixLibrary::filesExist(const QDir &base)
{
auto libFiles = files();
for(auto file: libFiles)
{
- QFileInfo info(file);
+ QFileInfo info(base, file);
+ QLOG_WARN() << info.absoluteFilePath() << "doesn't exist";
if (!info.exists())
return false;
}
diff --git a/logic/OneSixLibrary.h b/logic/OneSixLibrary.h
index a74b7cac..61d4c8e2 100644
--- a/logic/OneSixLibrary.h
+++ b/logic/OneSixLibrary.h
@@ -19,6 +19,7 @@
#include <QStringList>
#include <QMap>
#include <QJsonObject>
+#include <QDir>
#include <memory>
#include "logic/net/URLConstants.h"
@@ -142,6 +143,6 @@ public:
QString hint() const;
bool extractTo(QString target_dir);
- bool filesExist();
+ bool filesExist(const QDir &base);
QStringList files();
};
diff --git a/logic/OneSixUpdate.cpp b/logic/OneSixUpdate.cpp
index 27bc415f..d083c2ba 100644
--- a/logic/OneSixUpdate.cpp
+++ b/logic/OneSixUpdate.cpp
@@ -274,7 +274,7 @@ void OneSixUpdate::jarlibStart()
{
if (lib->hint() == "local")
{
- if(!lib->filesExist())
+ if(!lib->filesExist(m_inst->librariesPath()))
brokenLocalLibs.append(lib);
continue;
}