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>
This commit is contained in:
parent
741c23a72a
commit
20ba6e5fb5
@ -134,8 +134,8 @@ void ModrinthPackExportTask::collectHashes()
|
|||||||
QCryptographicHash sha1(QCryptographicHash::Algorithm::Sha1);
|
QCryptographicHash sha1(QCryptographicHash::Algorithm::Sha1);
|
||||||
sha1.addData(data);
|
sha1.addData(data);
|
||||||
|
|
||||||
ResolvedFile file{ sha1.result().toHex(), sha512.result().toHex(), url.toString(), openFile.size() };
|
ResolvedFile resolvedFile{ sha1.result().toHex(), sha512.result().toHex(), url.toEncoded(), openFile.size() };
|
||||||
resolvedFiles[relative] = file;
|
resolvedFiles[relative] = resolvedFile;
|
||||||
|
|
||||||
// nice! we've managed to resolve based on local metadata!
|
// nice! we've managed to resolve based on local metadata!
|
||||||
// no need to enqueue it
|
// no need to enqueue it
|
||||||
|
Loading…
Reference in New Issue
Block a user