GH-4055 Don't download multiple files to the same path

FTB should fix their metadata, but this should resolve issues
downloading their packs at present.
This commit is contained in:
Jamie Mansfield 2021-09-17 16:00:43 +01:00
parent e2355eb276
commit 0dcd24a53b
No known key found for this signature in database
GPG Key ID: 36F61598F39F67B0

View File

@ -108,6 +108,10 @@ void PackInstallTask::downloadPack()
auto relpath = FS::PathCombine("minecraft", file.path, file.name); auto relpath = FS::PathCombine("minecraft", file.path, file.name);
auto path = FS::PathCombine(m_stagingPath, relpath); 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; qDebug() << "Will download" << file.url << "to" << path;
filesToCopy[entry->getFullPath()] = path; filesToCopy[entry->getFullPath()] = path;