From b1ce7ce328e322cafa2401af77a9334c61b72034 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Tue, 2 Jul 2024 15:12:44 +0200 Subject: Convert StorageConfig to a general class --- src/buildtool/storage/fs_utils.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/buildtool/storage/fs_utils.cpp') diff --git a/src/buildtool/storage/fs_utils.cpp b/src/buildtool/storage/fs_utils.cpp index e50e892e..3286c4ec 100644 --- a/src/buildtool/storage/fs_utils.cpp +++ b/src/buildtool/storage/fs_utils.cpp @@ -54,14 +54,14 @@ auto GetGitRoot(StorageConfig const& storage_config, auto GetCommitTreeIDFile(StorageConfig const& storage_config, std::string const& commit) noexcept -> std::filesystem::path { - return storage_config.BuildRoot() / "commit-tree-map" / commit; + return storage_config.build_root / "commit-tree-map" / commit; } auto GetArchiveTreeIDFile(StorageConfig const& storage_config, std::string const& repo_type, std::string const& content) noexcept -> std::filesystem::path { - return storage_config.BuildRoot() / "tree-map" / repo_type / content; + return storage_config.build_root / "tree-map" / repo_type / content; } auto GetForeignFileTreeIDFile(StorageConfig const& storage_config, @@ -82,14 +82,14 @@ auto GetForeignFileTreeIDFile(StorageConfig const& storage_config, auto GetDistdirTreeIDFile(StorageConfig const& storage_config, std::string const& content) noexcept -> std::filesystem::path { - return storage_config.BuildRoot() / "distfiles-tree-map" / content; + return storage_config.build_root / "distfiles-tree-map" / content; } auto GetResolvedTreeIDFile(StorageConfig const& storage_config, std::string const& tree_hash, PragmaSpecial const& pragma_special) noexcept -> std::filesystem::path { - return storage_config.BuildRoot() / "special-tree-map" / + return storage_config.build_root / "special-tree-map" / kPragmaSpecialInverseMap.at(pragma_special) / tree_hash; } -- cgit v1.2.3