From ab7adbb24384387a5c46a6340ecdedc4c1481079 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Mon, 19 May 2025 17:55:40 +0200 Subject: Remove unneeded extra checks for upwards symlinks --- src/buildtool/execution_api/common/TARGETS | 1 - src/buildtool/execution_api/common/tree_reader_utils.cpp | 7 ------- 2 files changed, 8 deletions(-) (limited to 'src/buildtool/execution_api/common') diff --git a/src/buildtool/execution_api/common/TARGETS b/src/buildtool/execution_api/common/TARGETS index b13ac8b5..31a308ad 100644 --- a/src/buildtool/execution_api/common/TARGETS +++ b/src/buildtool/execution_api/common/TARGETS @@ -29,7 +29,6 @@ [ ["@", "json", "", "json"] , ["src/buildtool/logging", "log_level"] , ["src/utils/cpp", "hex_string"] - , ["src/utils/cpp", "path"] ] , "stage": ["src", "buildtool", "execution_api", "common"] } diff --git a/src/buildtool/execution_api/common/tree_reader_utils.cpp b/src/buildtool/execution_api/common/tree_reader_utils.cpp index 2ec90cc2..4d687bc5 100644 --- a/src/buildtool/execution_api/common/tree_reader_utils.cpp +++ b/src/buildtool/execution_api/common/tree_reader_utils.cpp @@ -29,7 +29,6 @@ #include "src/buildtool/logging/logger.hpp" #include "src/utils/cpp/expected.hpp" #include "src/utils/cpp/hex_string.hpp" -#include "src/utils/cpp/path.hpp" namespace { [[nodiscard]] auto CreateObjectInfo(HashFunction hash_function, @@ -104,12 +103,6 @@ auto TreeReaderUtils::ReadObjectInfos(bazel_re::Directory const& dir, } for (auto const& l : dir.symlinks()) { - // check validity of symlinks - if (not PathIsNonUpwards(l.target())) { - Logger::Log( - LogLevel::Error, "found invalid symlink at {}", l.name()); - return false; - } if (not store_info(l.name(), CreateObjectInfo(hash_function, l))) { return false; } -- cgit v1.2.3