diff --git a/src/tools/mmaps_generator/PathCommon.h b/src/tools/mmaps_generator/PathCommon.h index e3a11a322ee..ad07df09980 100644 --- a/src/tools/mmaps_generator/PathCommon.h +++ b/src/tools/mmaps_generator/PathCommon.h @@ -25,6 +25,7 @@ #ifndef _WIN32 #include + #include #include #endif @@ -109,7 +110,7 @@ namespace MMAP errno = 0; if ((dp = readdir(dirp)) != nullptr) { - if (matchWildcardFilter(filter.c_str(), dp->d_name)) + if (strcmp(dp->d_name, ".") != 0 && strcmp(dp->d_name, "..") != 0 && matchWildcardFilter(filter.c_str(), dp->d_name)) fileList.push_back(std::string(dp->d_name)); } else