Merge pull request #4106 from jamierocks/fix-4055

GH-4055 Don't download multiple files to the same path
This commit is contained in:
Petr Mrázek 2021-09-21 09:12:56 +02:00 committed by GitHub
commit d2a44effb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -108,6 +108,10 @@ void PackInstallTask::downloadPack()
auto relpath = FS::PathCombine("minecraft", file.path, file.name);
auto path = FS::PathCombine(m_stagingPath, relpath);
if (filesToCopy.contains(entry->getFullPath())) {
qWarning() << "Ignoring" << file.url << "as a file of that path is already downloading.";
continue;
}
qDebug() << "Will download" << file.url << "to" << path;
filesToCopy[entry->getFullPath()] = path;