fix: use QDir::Filter::NoDotAndDotDot
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
parent
a0045ece07
commit
df17f5e899
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user