diff options
author | flow <flowlnlnln@gmail.com> | 2022-12-04 12:29:38 -0300 |
---|---|---|
committer | flow <flowlnlnln@gmail.com> | 2022-12-04 12:29:38 -0300 |
commit | 928939cbe3b55a39f3a29926514f1dbd989936a4 (patch) | |
tree | b352ab11088c1a0bf655a38fdbba9b295294a105 /launcher/InstanceCopyTask.cpp | |
parent | 79d5beff8d45d9a66cfa91393167fc79d3a155a9 (diff) | |
download | PrismLauncher-928939cbe3b55a39f3a29926514f1dbd989936a4.tar.gz PrismLauncher-928939cbe3b55a39f3a29926514f1dbd989936a4.tar.bz2 PrismLauncher-928939cbe3b55a39f3a29926514f1dbd989936a4.zip |
fix(Inst.Copy): create FS::copy object inside the secundary thread
Signed-off-by: flow <flowlnlnln@gmail.com>
Diffstat (limited to 'launcher/InstanceCopyTask.cpp')
-rw-r--r-- | launcher/InstanceCopyTask.cpp | 6 |
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); |