diff options
| author | Zousar Shaker <[email protected]> | 2025-04-24 08:26:29 -0600 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2025-04-24 08:26:29 -0600 |
| commit | 787449efb4de24fd12f3af3c4e466a9629203108 (patch) | |
| tree | cb4a0e84a0381e9b4a087401037ba5837e8e65d7 /src/zen/cmds/admin_cmd.cpp | |
| parent | Changelog update terminology (diff) | |
| parent | 5.6.6-pre1 (diff) | |
| download | archived-zen-787449efb4de24fd12f3af3c4e466a9629203108.tar.xz archived-zen-787449efb4de24fd12f3af3c4e466a9629203108.zip | |
Merge branch 'main' into zs/zencli-list-namespaces-buckets
Diffstat (limited to 'src/zen/cmds/admin_cmd.cpp')
| -rw-r--r-- | src/zen/cmds/admin_cmd.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/zen/cmds/admin_cmd.cpp b/src/zen/cmds/admin_cmd.cpp index 573639c2d..a7cfa6a4e 100644 --- a/src/zen/cmds/admin_cmd.cpp +++ b/src/zen/cmds/admin_cmd.cpp @@ -714,29 +714,26 @@ CopyStateCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv) throw OptionParseException("data path must be given"); } - std::filesystem::path DataPath = StringToPath(m_DataPath); - std::filesystem::path TargetPath = StringToPath(m_TargetPath); - - if (!IsDir(DataPath)) + if (!IsDir(m_DataPath)) { throw OptionParseException("data path must exist"); } - if (TargetPath.empty()) + if (m_TargetPath.empty()) { throw OptionParseException("target path must be given"); } - std::filesystem::path RootManifestPath = DataPath / "root_manifest"; - std::filesystem::path TargetRootManifestPath = TargetPath / "root_manifest"; + std::filesystem::path RootManifestPath = m_DataPath / "root_manifest"; + std::filesystem::path TargetRootManifestPath = m_TargetPath / "root_manifest"; if (!TryCopy(RootManifestPath, TargetRootManifestPath)) { throw OptionParseException("data path is invalid, missing root_manifest"); } - std::filesystem::path CachePath = DataPath / "cache"; - std::filesystem::path TargetCachePath = TargetPath / "cache"; + std::filesystem::path CachePath = m_DataPath / "cache"; + std::filesystem::path TargetCachePath = m_TargetPath / "cache"; // Copy cache state DirectoryContent CacheDirectoryContent; @@ -781,8 +778,8 @@ CopyStateCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv) } } - std::filesystem::path CasPath = DataPath / "cas"; - std::filesystem::path TargetCasPath = TargetPath / "cas"; + std::filesystem::path CasPath = m_DataPath / "cas"; + std::filesystem::path TargetCasPath = m_TargetPath / "cas"; { std::filesystem::path UCasRootPath = CasPath / ".ucas_root"; |