summaryrefslogtreecommitdiff
path: root/src/buildtool/file_system/file_system_manager.hpp
diff options
context:
space:
mode:
authorAlberto Sartori <alberto.sartori@huawei.com>2022-04-07 15:00:45 +0200
committerAlberto Sartori <alberto.sartori@huawei.com>2022-04-07 15:00:45 +0200
commitbee3fe789bdf9691b2104b1e9a4ca6019e8713b2 (patch)
tree97190de9419d9b980d512834a5466c5a33ed1dbe /src/buildtool/file_system/file_system_manager.hpp
parent77190941b1b4dee61cbb65ead44df71f3f6c06dc (diff)
downloadjustbuild-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.hpp4
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) {