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/tree_reader_utils.cpp | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src/buildtool/execution_api/common/tree_reader_utils.cpp') 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