aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/dialogs/BlockedModsDialog.cpp
diff options
context:
space:
mode:
authorRachel Powers <508861+Ryex@users.noreply.github.com>2023-04-12 11:30:02 -0700
committerRachel Powers <508861+Ryex@users.noreply.github.com>2023-04-12 11:30:02 -0700
commita02f67ed0e9716a9dc2540b1353e7f25fb056d4b (patch)
tree73f66d9f798404bf9e1f9a1bd703e701a8fc3446 /launcher/ui/dialogs/BlockedModsDialog.cpp
parentc56db0408bc7bb01e9807fd02858f27328ca6b79 (diff)
downloadPrismLauncher-a02f67ed0e9716a9dc2540b1353e7f25fb056d4b.tar.gz
PrismLauncher-a02f67ed0e9716a9dc2540b1353e7f25fb056d4b.tar.bz2
PrismLauncher-a02f67ed0e9716a9dc2540b1353e7f25fb056d4b.zip
refactor: rename watch_subdirectories -> watch_recurisve (prevent confusion of behavior)
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Diffstat (limited to 'launcher/ui/dialogs/BlockedModsDialog.cpp')
-rw-r--r--launcher/ui/dialogs/BlockedModsDialog.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/launcher/ui/dialogs/BlockedModsDialog.cpp b/launcher/ui/dialogs/BlockedModsDialog.cpp
index f2ef734b..ba453df6 100644
--- a/launcher/ui/dialogs/BlockedModsDialog.cpp
+++ b/launcher/ui/dialogs/BlockedModsDialog.cpp
@@ -190,7 +190,7 @@ void BlockedModsDialog::setupWatch()
watchPath(modsFolder, true);
}
-void BlockedModsDialog::watchPath(QString path, bool watch_subdirectories)
+void BlockedModsDialog::watchPath(QString path, bool watch_recursive)
{
auto to_watch = QFileInfo(path);
auto to_watch_path = to_watch.canonicalFilePath();
@@ -200,14 +200,14 @@ void BlockedModsDialog::watchPath(QString path, bool watch_subdirectories)
qDebug() << "[Blocked Mods Dialog] Adding Watch Path:" << path;
m_watcher.addPath(to_watch_path);
- if (!to_watch.isDir() || !watch_subdirectories)
+ if (!to_watch.isDir() || !watch_recursive)
return;
QDirIterator it(to_watch_path, QDir::Filter::Dirs | QDir::Filter::NoDotAndDotDot, QDirIterator::NoIteratorFlags);
while (it.hasNext()) {
QString watch_dir = QDir(it.next()).canonicalPath(); // resolve symlinks and relative paths
- watchPath(watch_dir, watch_subdirectories);
+ watchPath(watch_dir, watch_recursive);
}
}