From e973d806453305aaedf855c83f3e404a4ef20d45 Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Wed, 28 Feb 2024 21:56:37 +0000 Subject: [PATCH] check abs path Signed-off-by: Ian Chen --- src/Utils.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Utils.cc b/src/Utils.cc index 5e1c9f245..28e41c00d 100644 --- a/src/Utils.cc +++ b/src/Utils.cc @@ -14,6 +14,7 @@ * limitations under the License. * */ +#include #include #include #include @@ -390,7 +391,9 @@ std::string resolveURI(const std::string &_inputURI, if (_config.StoreResolvedURIs()) { std::string sep("://"); - if (!_searchPaths.empty() && _inputURI.find(sep) == std::string::npos) + if (!_searchPaths.empty() && + _inputURI.find(sep) == std::string::npos && + !std::filesystem::path(_inputURI).is_absolute()) { for (const auto &sp : _searchPaths) {