summaryrefslogtreecommitdiffstats
path: root/logic/OneSixLibrary.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'logic/OneSixLibrary.cpp')
-rw-r--r--logic/OneSixLibrary.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/logic/OneSixLibrary.cpp b/logic/OneSixLibrary.cpp
index c78679d1..7032809d 100644
--- a/logic/OneSixLibrary.cpp
+++ b/logic/OneSixLibrary.cpp
@@ -140,33 +140,32 @@ QString OneSixLibrary::hint() const
return m_hint;
}
-bool OneSixLibrary::filesExist()
+QStringList OneSixLibrary::files()
{
+ QStringList retval;
QString storage = storagePath();
if (storage.contains("${arch}"))
{
QString cooked_storage = storage;
cooked_storage.replace("${arch}", "32");
- QFileInfo info32(PathCombine("libraries", cooked_storage));
- if (!info32.exists())
- {
- return false;
- }
+ retval.append(PathCombine("libraries", cooked_storage));
cooked_storage = storage;
cooked_storage.replace("${arch}", "64");
- QFileInfo info64(PathCombine("libraries", cooked_storage));
- if (!info64.exists())
- {
- return false;
- }
+ retval.append(PathCombine("libraries", cooked_storage));
}
else
+ retval.append(PathCombine("libraries", storage));
+ return retval;
+}
+
+bool OneSixLibrary::filesExist()
+{
+ auto libFiles = files();
+ for(auto file: libFiles)
{
- QFileInfo info(PathCombine("libraries", storage));
+ QFileInfo info(file);
if (!info.exists())
- {
return false;
- }
}
return true;
}