diff --git a/native/jni/src/suggest/policyimpl/dictionary/utils/file_utils.cpp b/native/jni/src/suggest/policyimpl/dictionary/utils/file_utils.cpp index 9441a75fc..fb80f38c5 100644 --- a/native/jni/src/suggest/policyimpl/dictionary/utils/file_utils.cpp +++ b/native/jni/src/suggest/policyimpl/dictionary/utils/file_utils.cpp @@ -68,6 +68,9 @@ namespace latinime { if (dirent->d_type == DT_DIR) { continue; } + if (strcmp(dirent->d_name, ".") == 0 || strcmp(dirent->d_name, "..") == 0) { + continue; + } const int filePathBufSize = getFilePathBufSize(dirPath, dirent->d_name); char filePath[filePathBufSize]; getFilePath(dirPath, dirent->d_name, filePathBufSize, filePath);