diff options
author | Petr Mrázek <peterix@gmail.com> | 2014-01-18 22:11:33 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2014-01-18 22:11:33 +0100 |
commit | 3fabb11f4c59baffb14db00d338d9efe342e277e (patch) | |
tree | c33d242761d31879f12821daab4d4f714a47b698 /logic/OneSixLibrary.cpp | |
parent | 8650aa81f06d9e229764b200f1dca135412c2ec1 (diff) | |
download | MultiMC-3fabb11f4c59baffb14db00d338d9efe342e277e.tar MultiMC-3fabb11f4c59baffb14db00d338d9efe342e277e.tar.gz MultiMC-3fabb11f4c59baffb14db00d338d9efe342e277e.tar.lz MultiMC-3fabb11f4c59baffb14db00d338d9efe342e277e.tar.xz MultiMC-3fabb11f4c59baffb14db00d338d9efe342e277e.zip |
Marginally improve OneSix offline mode launch
While reconstructing assets, skip files that don't exist.
Report missing OneSix native libraries.
Diffstat (limited to 'logic/OneSixLibrary.cpp')
-rw-r--r-- | logic/OneSixLibrary.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/logic/OneSixLibrary.cpp b/logic/OneSixLibrary.cpp index 1d69b660..cf29a832 100644 --- a/logic/OneSixLibrary.cpp +++ b/logic/OneSixLibrary.cpp @@ -136,6 +136,34 @@ QString OneSixLibrary::hint() return m_hint; } +bool OneSixLibrary::filesExist() +{ + QString storage = storagePath(); + if (storage.contains("${arch}")) + { + QString cooked_storage = storage; + cooked_storage.replace("${arch}", "32"); + if (!QFileInfo::exists(PathCombine("libraries", cooked_storage))) + { + return false; + } + cooked_storage = storage; + cooked_storage.replace("${arch}", "64"); + if (!QFileInfo::exists(PathCombine("libraries", cooked_storage))) + { + return false; + } + } + else + { + if (!QFileInfo::exists(PathCombine("libraries", storage))) + { + return false; + } + } + return true; +} + bool OneSixLibrary::extractTo(QString target_dir) { QString storage = storagePath(); |