From ee3dc7da5c4fdea2a31575e518167cf1826369af Mon Sep 17 00:00:00 2001 From: Falko Habel Date: Sun, 19 Jan 2025 15:24:17 +0100 Subject: [PATCH] correctly detecting build as a dir. --- tree_structurer/cpp/tree_structurer.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tree_structurer/cpp/tree_structurer.cpp b/tree_structurer/cpp/tree_structurer.cpp index 219455f..933012b 100644 --- a/tree_structurer/cpp/tree_structurer.cpp +++ b/tree_structurer/cpp/tree_structurer.cpp @@ -5,15 +5,16 @@ namespace fs = std::filesystem; bool TreeStructurer::should_ignore_dir(const std::string& dirname) { - return dirname[0] == '.' || + return dirname[0] == '.' || + dirname[0] == '_'|| dirname.find("build") != std::string::npos || dirname == "venv" || - dirname == "myenv"; + dirname == "myenv" || + dirname == "build"; } bool TreeStructurer::should_ignore_file(const std::string& filename) { - return filename[0] == '.' || - filename.find("build") != std::string::npos; + return filename[0] == '.'; } std::string TreeStructurer::create_indent(int level) {