From bee3fe789bdf9691b2104b1e9a4ca6019e8713b2 Mon Sep 17 00:00:00 2001 From: Alberto Sartori Date: Thu, 7 Apr 2022 15:00:45 +0200 Subject: FileSystemManager::ReadDirectory does just one system call --- src/buildtool/file_system/file_system_manager.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 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 f7a499a3..f2efbc3c 100644 --- a/src/buildtool/file_system/file_system_manager.hpp +++ b/src/buildtool/file_system/file_system_manager.hpp @@ -461,9 +461,9 @@ class FileSystemManager { for (auto const& entry : std::filesystem::directory_iterator{dir}) { std::optional type{}; if (entry.is_regular_file()) { - type = Type(entry.path()); + type = ObjectType::File; } - if (entry.is_directory()) { + else if (entry.is_directory()) { type = ObjectType::Tree; } if (not type) { -- cgit v1.2.3