diff options
author | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-03-27 19:11:26 -0700 |
---|---|---|
committer | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-03-27 19:11:26 -0700 |
commit | df17f5e899c5cb67d9bf7c4193ef6fb651993ee3 (patch) | |
tree | 14547781ea052be89328154b32351224c0390fca /launcher | |
parent | a0045ece075d5caf5d0b6982002dd6bd845ddf0f (diff) | |
download | PrismLauncher-df17f5e899c5cb67d9bf7c4193ef6fb651993ee3.tar.gz PrismLauncher-df17f5e899c5cb67d9bf7c4193ef6fb651993ee3.tar.bz2 PrismLauncher-df17f5e899c5cb67d9bf7c4193ef6fb651993ee3.zip |
fix: use QDir::Filter::NoDotAndDotDot
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Diffstat (limited to 'launcher')
-rw-r--r-- | launcher/ui/dialogs/BlockedModsDialog.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/launcher/ui/dialogs/BlockedModsDialog.cpp b/launcher/ui/dialogs/BlockedModsDialog.cpp index 36df5f46..7b3a395a 100644 --- a/launcher/ui/dialogs/BlockedModsDialog.cpp +++ b/launcher/ui/dialogs/BlockedModsDialog.cpp @@ -198,12 +198,9 @@ void BlockedModsDialog::watchPath(QString path, bool watch_subdirectories) if (!watch_subdirectories) return; - QDirIterator it(path, QDir::Filter::Dirs, QDirIterator::NoIteratorFlags); + QDirIterator it(path, QDir::Filter::Dirs | QDir::Filter::NoDotAndDotDot, QDirIterator::NoIteratorFlags); while (it.hasNext()) { QString dir_path = it.next(); - QDir to_watch_dir(dir_path); - if (to_watch_dir.dirName() == "." || to_watch_dir.dirName() == "..") - continue; watchPath(dir_path, watch_subdirectories); } } |