diff options
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(); |