From ecb38c82305ea23bfec84284aa77be5b5c64957a Mon Sep 17 00:00:00 2001 From: deanlee Date: Mon, 9 Aug 2021 23:50:21 +0800 Subject: [PATCH] use de->d_type==DT_REG --- selfdrive/common/util.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } }