diff options
author | Alberto Sartori <alberto.sartori@huawei.com> | 2022-04-07 15:00:45 +0200 |
---|---|---|
committer | Alberto Sartori <alberto.sartori@huawei.com> | 2022-04-07 15:00:45 +0200 |
commit | bee3fe789bdf9691b2104b1e9a4ca6019e8713b2 (patch) | |
tree | 97190de9419d9b980d512834a5466c5a33ed1dbe /src/buildtool/file_system/file_system_manager.hpp | |
parent | 77190941b1b4dee61cbb65ead44df71f3f6c06dc (diff) | |
download | justbuild-bee3fe789bdf9691b2104b1e9a4ca6019e8713b2.tar.gz |
FileSystemManager::ReadDirectory does just one system call
Diffstat (limited to 'src/buildtool/file_system/file_system_manager.hpp')
-rw-r--r-- | src/buildtool/file_system/file_system_manager.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<ObjectType> 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) { |