diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-06-17 11:28:47 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-07-05 12:58:35 +0200 |
commit | c88585ddf9386fb14154a4f3baa702569d55584a (patch) | |
tree | 05461204866831ab88364981390dae474f16247d /src/buildtool/storage/fs_utils.cpp | |
parent | 8c73c618d777a07c017ec0deefe88db83652827e (diff) | |
download | justbuild-c88585ddf9386fb14154a4f3baa702569d55584a.tar.gz |
Use StorageConfig functionality via Instance()
...to track changes during refactoring easier.
Diffstat (limited to 'src/buildtool/storage/fs_utils.cpp')
-rw-r--r-- | src/buildtool/storage/fs_utils.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/buildtool/storage/fs_utils.cpp b/src/buildtool/storage/fs_utils.cpp index 95b5e72b..539e0956 100644 --- a/src/buildtool/storage/fs_utils.cpp +++ b/src/buildtool/storage/fs_utils.cpp @@ -48,18 +48,19 @@ auto GetGitRoot(LocalPathsPtr const& just_mr_paths, FileSystemManager::IsDirectory(repo_url_as_path)) { return repo_url_as_path; } - return StorageConfig::GitRoot(); + return StorageConfig::Instance().GitRoot(); } auto GetCommitTreeIDFile(std::string const& commit) noexcept -> std::filesystem::path { - return StorageConfig::BuildRoot() / "commit-tree-map" / commit; + return StorageConfig::Instance().BuildRoot() / "commit-tree-map" / commit; } auto GetArchiveTreeIDFile(std::string const& repo_type, std::string const& content) noexcept -> std::filesystem::path { - return StorageConfig::BuildRoot() / "tree-map" / repo_type / content; + return StorageConfig::Instance().BuildRoot() / "tree-map" / repo_type / + content; } auto GetForeignFileTreeIDFile(std::string const& content, @@ -77,13 +78,14 @@ auto GetForeignFileTreeIDFile(std::string const& content, auto GetDistdirTreeIDFile(std::string const& content) noexcept -> std::filesystem::path { - return StorageConfig::BuildRoot() / "distfiles-tree-map" / content; + return StorageConfig::Instance().BuildRoot() / "distfiles-tree-map" / + content; } auto GetResolvedTreeIDFile(std::string const& tree_hash, PragmaSpecial const& pragma_special) noexcept -> std::filesystem::path { - return StorageConfig::BuildRoot() / "special-tree-map" / + return StorageConfig::Instance().BuildRoot() / "special-tree-map" / kPragmaSpecialInverseMap.at(pragma_special) / tree_hash; } |