aboutsummaryrefslogtreecommitdiff
path: root/launcher/InstanceCopyTask.cpp
diff options
context:
space:
mode:
authorRyan Cao <70191398+ryanccn@users.noreply.github.com>2022-11-14 19:26:31 +0800
committerGitHub <noreply@github.com>2022-11-14 19:26:31 +0800
commit2c9452efaf33cb22dbc29a4c6117a646f0de943f (patch)
treec5394f5194066989504b572c5a4aeeeb74d954d9 /launcher/InstanceCopyTask.cpp
parent97a7af855f8a96a0e73181c5e32a15bbd2cb67f2 (diff)
parent074b53eb6b71f948ff30aca601103672c5c4c812 (diff)
downloadPrismLauncher-2c9452efaf33cb22dbc29a4c6117a646f0de943f.tar.gz
PrismLauncher-2c9452efaf33cb22dbc29a4c6117a646f0de943f.tar.bz2
PrismLauncher-2c9452efaf33cb22dbc29a4c6117a646f0de943f.zip
Merge branch 'develop' into macos-add-to-path
Diffstat (limited to 'launcher/InstanceCopyTask.cpp')
-rw-r--r--launcher/InstanceCopyTask.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/launcher/InstanceCopyTask.cpp b/launcher/InstanceCopyTask.cpp
index b1e33884..a4ea947d 100644
--- a/launcher/InstanceCopyTask.cpp
+++ b/launcher/InstanceCopyTask.cpp
@@ -5,15 +5,17 @@
#include "pathmatcher/RegexpMatcher.h"
#include <QtConcurrentRun>
-InstanceCopyTask::InstanceCopyTask(InstancePtr origInstance, bool copySaves, bool keepPlaytime)
+InstanceCopyTask::InstanceCopyTask(InstancePtr origInstance, const InstanceCopyPrefs& prefs)
{
m_origInstance = origInstance;
- m_keepPlaytime = keepPlaytime;
+ m_keepPlaytime = prefs.isKeepPlaytimeEnabled();
- if(!copySaves)
+ QString filters = prefs.getSelectedFiltersAsRegex();
+ if (!filters.isEmpty())
{
+ // Set regex filter:
// FIXME: get this from the original instance type...
- auto matcherReal = new RegexpMatcher("[.]?minecraft/saves");
+ auto matcherReal = new RegexpMatcher(filters);
matcherReal->caseSensitive(false);
m_matcher.reset(matcherReal);
}