fix: dequeue first added file in mrpack import

Co-authored-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
flow 2022-06-11 14:19:51 -03:00 committed by GitHub
parent 54144154f9
commit 29e5a213a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -744,7 +744,7 @@ void InstanceImportTask::processModrinth()
{
auto path = FS::PathCombine(m_stagingPath, ".minecraft", file.path);
qDebug() << "Will try to download" << file.downloads.front() << "to" << path;
auto dl = Net::Download::makeFile(file.downloads.front(), path);
auto dl = Net::Download::makeFile(file.downloads.dequeue(), path);
dl->addValidator(new Net::ChecksumValidator(file.hashAlgorithm, file.hash));
m_filesNetJob->addNetAction(dl);