aboutsummaryrefslogtreecommitdiff
path: root/launcher/modplatform
diff options
context:
space:
mode:
authorJames Beddek <telans@posteo.de>2023-06-24 15:42:58 +1200
committerJames Beddek <telans@posteo.de>2023-06-24 15:42:58 +1200
commit20ba6e5fb50177d5145459951a69edc7b3302e95 (patch)
tree6bf49e963c23cca7e42c2a1d75e8b87890914d13 /launcher/modplatform
parent741c23a72ab2b34d8b1ddab93babd25d3ea1cc9e (diff)
downloadPrismLauncher-20ba6e5fb50177d5145459951a69edc7b3302e95.tar.gz
PrismLauncher-20ba6e5fb50177d5145459951a69edc7b3302e95.tar.bz2
PrismLauncher-20ba6e5fb50177d5145459951a69edc7b3302e95.zip
modrinth: use encoded url when exporting pack
Ensures that necessary url components such as spaces are encoded. Prevents an error when submitting the resulting file to modrinth. See https://discord.com/channels/734077874708938864/1120070731242410024 Fixes: #1226 Signed-off-by: James Beddek <telans@posteo.de>
Diffstat (limited to 'launcher/modplatform')
-rw-r--r--launcher/modplatform/modrinth/ModrinthPackExportTask.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/launcher/modplatform/modrinth/ModrinthPackExportTask.cpp b/launcher/modplatform/modrinth/ModrinthPackExportTask.cpp
index c607bb89..4cd88aa6 100644
--- a/launcher/modplatform/modrinth/ModrinthPackExportTask.cpp
+++ b/launcher/modplatform/modrinth/ModrinthPackExportTask.cpp
@@ -134,8 +134,8 @@ void ModrinthPackExportTask::collectHashes()
QCryptographicHash sha1(QCryptographicHash::Algorithm::Sha1);
sha1.addData(data);
- ResolvedFile file{ sha1.result().toHex(), sha512.result().toHex(), url.toString(), openFile.size() };
- resolvedFiles[relative] = file;
+ ResolvedFile resolvedFile{ sha1.result().toHex(), sha512.result().toHex(), url.toEncoded(), openFile.size() };
+ resolvedFiles[relative] = resolvedFile;
// nice! we've managed to resolve based on local metadata!
// no need to enqueue it