diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-07-06 14:29:27 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-07-11 14:07:11 +0200 |
commit | 85938804a4a043c75cc4ca51a64ee789e55ba7cb (patch) | |
tree | ee04af0ecd39e8c9697d2405edc0c318ff906fed /src/buildtool/main/main.cpp | |
parent | bec3322cfff305f13735c5f72febfd752b49fa10 (diff) | |
download | justbuild-85938804a4a043c75cc4ca51a64ee789e55ba7cb.tar.gz |
filesystem: Avoid unwanted indirections...
...that std::filesystem::* calls produce. This is because existence
and type checks use almost exclusively std::filesystem::status,
which follows symbolic links, when being called with path arguments.
Instead, one should instead use these methods with the value
returned by a call of std::filesystem::symlink_status.
This commit also streamlines the FileSystemManager tests, as well
as replace bare calls to std::filesystem with their FileSystemManager
counterparts (where suitable).
Diffstat (limited to 'src/buildtool/main/main.cpp')
-rw-r--r-- | src/buildtool/main/main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/buildtool/main/main.cpp b/src/buildtool/main/main.cpp index 846fe257..8d2d4d2e 100644 --- a/src/buildtool/main/main.cpp +++ b/src/buildtool/main/main.cpp @@ -479,7 +479,7 @@ void SetupHashFunction() { -> Configuration { Configuration config{}; if (not clargs.config_file.empty()) { - if (not std::filesystem::exists(clargs.config_file)) { + if (not FileSystemManager::Exists(clargs.config_file)) { Logger::Log(LogLevel::Error, "Config file {} does not exist.", clargs.config_file.string()); |