aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2022-12-04 23:47:09 +0100
committerGitHub <noreply@github.com>2022-12-04 23:47:09 +0100
commit45b0762096c14a2557ba2ab12d03a15d6d8aebc0 (patch)
treeb352ab11088c1a0bf655a38fdbba9b295294a105
parent79d5beff8d45d9a66cfa91393167fc79d3a155a9 (diff)
parent928939cbe3b55a39f3a29926514f1dbd989936a4 (diff)
downloadPrismLauncher-45b0762096c14a2557ba2ab12d03a15d6d8aebc0.tar.gz
PrismLauncher-45b0762096c14a2557ba2ab12d03a15d6d8aebc0.tar.bz2
PrismLauncher-45b0762096c14a2557ba2ab12d03a15d6d8aebc0.zip
Merge pull request #547 from flowln/fix_copying_instance
Fixes https://github.com/PrismLauncher/PrismLauncher/issues/545
-rw-r--r--launcher/InstanceCopyTask.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/launcher/InstanceCopyTask.cpp b/launcher/InstanceCopyTask.cpp
index 0a83ed9c..188d163b 100644
--- a/launcher/InstanceCopyTask.cpp
+++ b/launcher/InstanceCopyTask.cpp
@@ -25,10 +25,10 @@ void InstanceCopyTask::executeTask()
{
setStatus(tr("Copying instance %1").arg(m_origInstance->name()));
- FS::copy folderCopy(m_origInstance->instanceRoot(), m_stagingPath);
- folderCopy.followSymlinks(false).matcher(m_matcher.get());
+ m_copyFuture = QtConcurrent::run(QThreadPool::globalInstance(), [this]{
+ FS::copy folderCopy(m_origInstance->instanceRoot(), m_stagingPath);
+ folderCopy.followSymlinks(false).matcher(m_matcher.get());
- m_copyFuture = QtConcurrent::run(QThreadPool::globalInstance(), [&folderCopy]{
return folderCopy();
});
connect(&m_copyFutureWatcher, &QFutureWatcher<bool>::finished, this, &InstanceCopyTask::copyFinished);