diff options
author | flow <thiagodonato300@gmail.com> | 2022-04-21 15:45:20 -0300 |
---|---|---|
committer | flow <flowlnlnln@gmail.com> | 2022-05-23 14:43:09 -0300 |
commit | e17b6804a7424dd5161662c4ef92972f3311675c (patch) | |
tree | 2d6e5268d3ce2499d6e765797c35a4bec7062aa3 /launcher/minecraft | |
parent | 96e36f060443cbfa6d58df2adca3c8605851b4a3 (diff) | |
download | PrismLauncher-e17b6804a7424dd5161662c4ef92972f3311675c.tar.gz PrismLauncher-e17b6804a7424dd5161662c4ef92972f3311675c.tar.bz2 PrismLauncher-e17b6804a7424dd5161662c4ef92972f3311675c.zip |
fix: implement PR suggestions
Some stylistic changes, and get hashes from the mod providers when
building the metadata.
Diffstat (limited to 'launcher/minecraft')
-rw-r--r-- | launcher/minecraft/mod/tasks/ModFolderLoadTask.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/launcher/minecraft/mod/tasks/ModFolderLoadTask.cpp b/launcher/minecraft/mod/tasks/ModFolderLoadTask.cpp index addb0dd8..fe807a29 100644 --- a/launcher/minecraft/mod/tasks/ModFolderLoadTask.cpp +++ b/launcher/minecraft/mod/tasks/ModFolderLoadTask.cpp @@ -10,7 +10,7 @@ ModFolderLoadTask::ModFolderLoadTask(QDir& mods_dir, QDir& index_dir) void ModFolderLoadTask::run() { - if (!APPLICATION->settings()->get("DontUseModMetadata").toBool()) { + if (!APPLICATION->settings()->get("ModMetadataDisabled").toBool()) { // Read metadata first getFromMetadata(); } @@ -34,14 +34,9 @@ void ModFolderLoadTask::run() void ModFolderLoadTask::getFromMetadata() { m_index_dir.refresh(); - for (auto entry : m_index_dir.entryList()) { - // QDir::Filter::NoDotAndDotDot seems to exclude all files for some reason... - if (entry == "." || entry == "..") - continue; - + for (auto entry : m_index_dir.entryList(QDir::Files)) { auto metadata = Metadata::get(m_index_dir, entry); - // TODO: Don't simply return. Instead, show to the user that the metadata is there, but - // it's not currently 'installed' (i.e. there's no JAR file yet). + if(!metadata.isValid()){ return; } |