aboutsummaryrefslogtreecommitdiff
path: root/launcher
diff options
context:
space:
mode:
authorTheKodeToad <TheKodeToad@proton.me>2023-06-12 14:14:50 +0100
committerGitHub <noreply@github.com>2023-06-12 14:14:50 +0100
commit94ddc8bbf7a65f08079c4cf42deb4eea86b1e53b (patch)
tree7780692277a463606063862a5a2d290516fdb819 /launcher
parentbfe7e3afed286de02dfc1ec4cc2b39f31972d295 (diff)
downloadPrismLauncher-94ddc8bbf7a65f08079c4cf42deb4eea86b1e53b.tar.gz
PrismLauncher-94ddc8bbf7a65f08079c4cf42deb4eea86b1e53b.tar.bz2
PrismLauncher-94ddc8bbf7a65f08079c4cf42deb4eea86b1e53b.zip
Could this work?
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Diffstat (limited to 'launcher')
-rw-r--r--launcher/modplatform/modrinth/ModrinthPackExportTask.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/launcher/modplatform/modrinth/ModrinthPackExportTask.cpp b/launcher/modplatform/modrinth/ModrinthPackExportTask.cpp
index 29df90dd..eff47b37 100644
--- a/launcher/modplatform/modrinth/ModrinthPackExportTask.cpp
+++ b/launcher/modplatform/modrinth/ModrinthPackExportTask.cpp
@@ -27,7 +27,7 @@
#include "minecraft/PackProfile.h"
#include "minecraft/mod/ModFolderModel.h"
-const QStringList ModrinthPackExportTask::PREFIXES({ "mods", "coremods", "resourcepacks", "texturepacks", "shaderpacks" });
+const QStringList ModrinthPackExportTask::PREFIXES({ "mods/", "coremods/", "resourcepacks/", "texturepacks/", "shaderpacks/" });
const QStringList ModrinthPackExportTask::FILE_EXTENSIONS({ "jar", "litemod", "zip" });
ModrinthPackExportTask::ModrinthPackExportTask(const QString& name,
@@ -99,14 +99,12 @@ void ModrinthPackExportTask::collectHashes()
const QString relative = gameRoot.relativeFilePath(file.absoluteFilePath());
// require sensible file types
- if (!std::any_of(PREFIXES.begin(), PREFIXES.end(),
- [&relative](const QString& prefix) { return relative.startsWith(prefix + QDir::separator()); }))
+ if (!std::any_of(PREFIXES.begin(), PREFIXES.end(), [&relative](const QString& prefix) { return relative.startsWith(prefix); }))
continue;
if (!std::any_of(FILE_EXTENSIONS.begin(), FILE_EXTENSIONS.end(), [&relative](const QString& extension) {
return relative.endsWith('.' + extension) || relative.endsWith('.' + extension + ".disabled");
- })) {
+ }))
continue;
- }
QCryptographicHash sha512(QCryptographicHash::Algorithm::Sha512);