From dda280d9b651d20374caf61d54351960c93124b4 Mon Sep 17 00:00:00 2001 From: Oliver Reiche Date: Mon, 10 Oct 2022 16:22:50 +0200 Subject: FileSystemMgr: Suppress unsupported object type warning ... if the object does not even exist. In that case, a trace message is produced and the caller is responsible for reporting errors. --- src/buildtool/file_system/file_system_manager.hpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/buildtool/file_system/file_system_manager.hpp') diff --git a/src/buildtool/file_system/file_system_manager.hpp b/src/buildtool/file_system/file_system_manager.hpp index 50118f81..0595aae5 100644 --- a/src/buildtool/file_system/file_system_manager.hpp +++ b/src/buildtool/file_system/file_system_manager.hpp @@ -400,9 +400,15 @@ class FileSystemManager { if (IsDirectory(path)) { return ObjectType::Tree; } - Logger::Log(LogLevel::Debug, - "object type for {} not supported yet.", - path.string()); + if (Exists(path)) { + Logger::Log(LogLevel::Debug, + "object type for {} is not supported yet.", + path.string()); + } + else { + Logger::Log( + LogLevel::Trace, "non-existing object path {}.", path.string()); + } return std::nullopt; } -- cgit v1.2.3