diff --git a/selfdrive/common/util.cc b/selfdrive/common/util.cc index 7934a4a1f6..9c9997b72e 100644 --- a/selfdrive/common/util.cc +++ b/selfdrive/common/util.cc @@ -85,7 +85,7 @@ std::map read_files_in_dir(const std::string &path) { struct dirent *de = NULL; while ((de = readdir(d))) { - if (de->d_type != DT_DIR) { + if (de->d_type == DT_REG) { ret[de->d_name] = util::read_file(path + "/" + de->d_name); } }