aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/mod/tasks
diff options
context:
space:
mode:
authorkumquat-ir <66188216+kumquat-ir@users.noreply.github.com>2023-02-22 13:20:13 -0500
committerkumquat-ir <66188216+kumquat-ir@users.noreply.github.com>2023-02-22 13:20:13 -0500
commitdc8109658c3c178e91acfc316467d1bdffe0bf40 (patch)
tree3f1fa75ece30591bf8b41844c82dda2d4baefd7b /launcher/minecraft/mod/tasks
parent7973b01e81af29f0de7c6873ef119f15a2fb0791 (diff)
downloadPrismLauncher-dc8109658c3c178e91acfc316467d1bdffe0bf40.tar.gz
PrismLauncher-dc8109658c3c178e91acfc316467d1bdffe0bf40.tar.bz2
PrismLauncher-dc8109658c3c178e91acfc316467d1bdffe0bf40.zip
review fixes
Signed-off-by: kumquat-ir <66188216+kumquat-ir@users.noreply.github.com>
Diffstat (limited to 'launcher/minecraft/mod/tasks')
-rw-r--r--launcher/minecraft/mod/tasks/LocalModParseTask.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/launcher/minecraft/mod/tasks/LocalModParseTask.cpp b/launcher/minecraft/mod/tasks/LocalModParseTask.cpp
index 945ccda7..da27a505 100644
--- a/launcher/minecraft/mod/tasks/LocalModParseTask.cpp
+++ b/launcher/minecraft/mod/tasks/LocalModParseTask.cpp
@@ -432,21 +432,22 @@ bool processZIP(Mod& mod, ProcessingLevel level)
// nilloader uses the filename of the metadata file for the modid, so we can't know the exact filename
// thankfully, there is a good file to use as a canary so we don't look for nil meta all the time
- QStringList foundNilMetas;
+ QString foundNilMeta;
for (auto& fname : zip.getFileNameList()) {
// nilmods can shade nilloader to be able to run as a standalone agent - which includes nilloader's own meta file
if (fname.endsWith(".nilmod.css") && fname != "nilloader.nilmod.css") {
- foundNilMetas.append(fname);
+ foundNilMeta = fname;
+ break;
}
}
- if (zip.setCurrentFile(foundNilMetas.at(0))) {
+ if (zip.setCurrentFile(foundNilMeta)) {
if (!file.open(QIODevice::ReadOnly)) {
zip.close();
return false;
}
- details = ReadNilModInfo(file.readAll(), foundNilMetas.at(0));
+ details = ReadNilModInfo(file.readAll(), foundNilMeta);
file.close();
zip.close();