From ea21bce031d679e23c27814dc6e129f4e2b1fc00 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Tue, 10 May 2022 16:45:57 +0200 Subject: Ensure we also correctly handle tree conflicts between files Not only trees, but also regular files can disallow paths reaching into them. If we have a file at a/b then another file at a/b/c is a staging conflict as well. Make our tool recognize this. --- src/buildtool/build_engine/target_map/target_map.cpp | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'src/buildtool/build_engine/target_map/target_map.cpp') diff --git a/src/buildtool/build_engine/target_map/target_map.cpp b/src/buildtool/build_engine/target_map/target_map.cpp index 2f5df0b5..4f4a087b 100644 --- a/src/buildtool/build_engine/target_map/target_map.cpp +++ b/src/buildtool/build_engine/target_map/target_map.cpp @@ -554,19 +554,6 @@ void withDependencies( } auto norm_path = ToNormalPath(std::filesystem::path{input_path}); - if (norm_path == "." or norm_path.empty()) { - if (val->Map().size() > 1) { - throw Evaluator::EvaluationError{ - "input path '.' or '' for TREE is only allowed " - "for trees with single input artifact"}; - } - if (not artifact->Artifact().IsTree()) { - throw Evaluator::EvaluationError{ - "input path '.' or '' for TREE must be tree " - "artifact"}; - } - return artifact; - } artifacts.emplace(std::move(norm_path), artifact->Artifact()); } auto conflict = BuildMaps::Target::Utils::tree_conflict(val); -- cgit v1.2.3