aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@users.noreply.github.com>2021-09-21 09:12:56 +0200
committerGitHub <noreply@github.com>2021-09-21 09:12:56 +0200
commitd2a44effb5f422e417f3c5a766473c97f9d48f8f (patch)
treef761715e34fab6ec78a7e068334f0bbcb02d3df8
parente2355eb276bf355ca4acf526a0f3cc390aa88f8b (diff)
parent0dcd24a53bd4567ff3572f4a60c639daa5b135ea (diff)
downloadPrismLauncher-d2a44effb5f422e417f3c5a766473c97f9d48f8f.tar.gz
PrismLauncher-d2a44effb5f422e417f3c5a766473c97f9d48f8f.tar.bz2
PrismLauncher-d2a44effb5f422e417f3c5a766473c97f9d48f8f.zip
Merge pull request #4106 from jamierocks/fix-4055
GH-4055 Don't download multiple files to the same path
-rw-r--r--launcher/modplatform/modpacksch/FTBPackInstallTask.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/launcher/modplatform/modpacksch/FTBPackInstallTask.cpp b/launcher/modplatform/modpacksch/FTBPackInstallTask.cpp
index f22373bc..2e87a754 100644
--- a/launcher/modplatform/modpacksch/FTBPackInstallTask.cpp
+++ b/launcher/modplatform/modpacksch/FTBPackInstallTask.cpp
@@ -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;