diff options
Diffstat (limited to 'launcher/InstanceCopyTask.cpp')
-rw-r--r-- | launcher/InstanceCopyTask.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/launcher/InstanceCopyTask.cpp b/launcher/InstanceCopyTask.cpp index a4ea947d..188d163b 100644 --- a/launcher/InstanceCopyTask.cpp +++ b/launcher/InstanceCopyTask.cpp @@ -25,10 +25,12 @@ void InstanceCopyTask::executeTask() { setStatus(tr("Copying instance %1").arg(m_origInstance->name())); - FS::copy folderCopy(m_origInstance->instanceRoot(), m_stagingPath); - folderCopy.followSymlinks(false).blacklist(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); connect(&m_copyFutureWatcher, &QFutureWatcher<bool>::canceled, this, &InstanceCopyTask::copyAborted); m_copyFutureWatcher.setFuture(m_copyFuture); |