aboutsummaryrefslogtreecommitdiff
path: root/launcher
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@users.noreply.github.com>2021-09-28 18:25:42 +0200
committerGitHub <noreply@github.com>2021-09-28 18:25:42 +0200
commit3f3fac8462e30e96b1ad4c1bb98518cdfce8bd86 (patch)
tree2e253daea2d03a3984ea3b9e4e48707c6447eacb /launcher
parente46dc03eb15e03c00b407e48a77e8e6d8991a210 (diff)
parent433dd2d16168845889373ffb98a9f3b806ea1de2 (diff)
downloadPrismLauncher-3f3fac8462e30e96b1ad4c1bb98518cdfce8bd86.tar.gz
PrismLauncher-3f3fac8462e30e96b1ad4c1bb98518cdfce8bd86.tar.bz2
PrismLauncher-3f3fac8462e30e96b1ad4c1bb98518cdfce8bd86.zip
Merge pull request #4117 from jamierocks/fix-4114
GH-4114 Allow the same file for be downloaded to multiple paths
Diffstat (limited to 'launcher')
-rw-r--r--launcher/modplatform/modpacksch/FTBPackInstallTask.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/launcher/modplatform/modpacksch/FTBPackInstallTask.cpp b/launcher/modplatform/modpacksch/FTBPackInstallTask.cpp
index 2e87a754..496edde7 100644
--- a/launcher/modplatform/modpacksch/FTBPackInstallTask.cpp
+++ b/launcher/modplatform/modpacksch/FTBPackInstallTask.cpp
@@ -108,12 +108,12 @@ void PackInstallTask::downloadPack()
auto relpath = FS::PathCombine("minecraft", file.path, file.name);
auto path = FS::PathCombine(m_stagingPath, relpath);
- if (filesToCopy.contains(entry->getFullPath())) {
+ if (filesToCopy.contains(path)) {
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;
+ filesToCopy[path] = entry->getFullPath();
auto dl = Net::Download::makeCached(file.url, entry);
if (!file.sha1.isEmpty()) {
@@ -149,8 +149,8 @@ void PackInstallTask::install()
setStatus(tr("Copying modpack files"));
for (auto iter = filesToCopy.begin(); iter != filesToCopy.end(); iter++) {
- auto &from = iter.key();
- auto &to = iter.value();
+ auto &to = iter.key();
+ auto &from = iter.value();
FS::copy fileCopyOperation(from, to);
if(!fileCopyOperation()) {
qWarning() << "Failed to copy" << from << "to" << to;