From b901f2dc77898dc728b98274882b1ad0c0a4db66 Mon Sep 17 00:00:00 2001 From: valeros Date: Wed, 27 Mar 2024 20:25:34 +0200 Subject: [PATCH] Typo fix --- builder/frameworks/espidf.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/builder/frameworks/espidf.py b/builder/frameworks/espidf.py index e5992b2..7c20e9a 100644 --- a/builder/frameworks/espidf.py +++ b/builder/frameworks/espidf.py @@ -665,7 +665,7 @@ def compile_source_files( ): build_envs = prepare_build_envs(config, default_env, debug_allowed) objects = [] - components_dir = fs.to_unix_path(os.path.join(FRAMEWORK_DIR, "components")).lower() + components_dir = fs.to_unix_path(os.path.join(FRAMEWORK_DIR, "components")) for source in config.get("sources", []): if source["path"].endswith(".rule"): continue @@ -674,16 +674,13 @@ def compile_source_files( src_dir = config["paths"]["source"] if not os.path.isabs(src_dir): src_dir = os.path.join(project_src_dir, config["paths"]["source"]) - src_path = os.path.join( - os.path.dirname(source.get("path")).lower(), - os.path.basename(source.get("path")) - ) + src_path = source.get("path") if not os.path.isabs(src_path): # For cases when sources are located near CMakeLists.txt src_path = os.path.join(project_src_dir, src_path) obj_path = os.path.join("$BUILD_DIR", prepend_dir or "") - if src_path.startswith(components_dir): + if src_path.lower().startswith(components_dir.lower()): obj_path = os.path.join( obj_path, os.path.relpath(src_path, components_dir) )