summaryrefslogtreecommitdiffstats
path: root/api/logic
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2017-04-14 12:21:10 +0200
committerPetr Mrázek <peterix@gmail.com>2017-04-14 12:21:10 +0200
commit2aaf9827a67bf3de23b6b8ad9e85a42686659d1a (patch)
tree1eca0bf938289c556a63b6053d1e51bf60995f2b /api/logic
parent910766458de68c37c8c4dab13c584c4c68502cd0 (diff)
downloadMultiMC-2aaf9827a67bf3de23b6b8ad9e85a42686659d1a.tar
MultiMC-2aaf9827a67bf3de23b6b8ad9e85a42686659d1a.tar.gz
MultiMC-2aaf9827a67bf3de23b6b8ad9e85a42686659d1a.tar.lz
MultiMC-2aaf9827a67bf3de23b6b8ad9e85a42686659d1a.tar.xz
MultiMC-2aaf9827a67bf3de23b6b8ad9e85a42686659d1a.zip
NOISSUE slightly refactor jarMod entry reading
Diffstat (limited to 'api/logic')
-rw-r--r--api/logic/minecraft/onesix/OneSixVersionFormat.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/api/logic/minecraft/onesix/OneSixVersionFormat.cpp b/api/logic/minecraft/onesix/OneSixVersionFormat.cpp
index 1da375ad..267ad888 100644
--- a/api/logic/minecraft/onesix/OneSixVersionFormat.cpp
+++ b/api/logic/minecraft/onesix/OneSixVersionFormat.cpp
@@ -103,12 +103,6 @@ VersionFilePtr OneSixVersionFormat::versionFileFromJson(const QJsonDocument &doc
QJsonObject libObj = requireObject(libVal);
// parse the jarmod
auto lib = OneSixVersionFormat::jarModFromJson(libObj, filename, out->name);
- if(lib->originalName.isEmpty())
- {
- auto fixed = out->name;
- fixed.remove(" (jar mod)");
- lib->originalName = out->name;
- }
// and add to jar mods
out->jarMods.append(lib);
}
@@ -248,6 +242,12 @@ JarmodPtr OneSixVersionFormat::jarModFromJson(const QJsonObject &libObj, const Q
}
out->name = libObj.value("name").toString();
out->originalName = libObj.value("originalName").toString();
+ if(out->originalName.isEmpty())
+ {
+ auto fixed = originalName;
+ fixed.remove(" (jar mod)");
+ out->originalName = originalName;
+ }
return out;
}