From 25a7b98be01d94857e5ab6c89be39dcecd2d8546 Mon Sep 17 00:00:00 2001 From: Ted John Date: Sat, 22 Oct 2016 23:09:45 +0100 Subject: [PATCH] Omit . and .. from linix file scanning too --- src/core/FileScanner.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/core/FileScanner.cpp b/src/core/FileScanner.cpp index 7271622f86..93ef898789 100644 --- a/src/core/FileScanner.cpp +++ b/src/core/FileScanner.cpp @@ -303,8 +303,13 @@ protected: { for (int i = 0; i < count; i++) { - DirectoryChild child = CreateChild(path, namelist[i]); - children.push_back(child); + const struct dirent * node = namelist[i]; + if (!String::Equals(node->d_name, ".") && + !String::Equals(node->d_name, "..")) + { + DirectoryChild child = CreateChild(path, node); + children.push_back(child); + } } } }