aboutsummaryrefslogtreecommitdiff
path: root/src/zen/cmds/service_cmd.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2026-04-21 17:22:18 +0200
committerGitHub Enterprise <[email protected]>2026-04-21 17:22:18 +0200
commit82e222bf23dee04e6fb825037fbb4d86a9571ce0 (patch)
tree007b805500a5e23167ae8acc977efc3a6298d826 /src/zen/cmds/service_cmd.cpp
parentimproved s3 hydration (#997) (diff)
downloadarchived-zen-82e222bf23dee04e6fb825037fbb4d86a9571ce0.tar.xz
archived-zen-82e222bf23dee04e6fb825037fbb4d86a9571ce0.zip
filesystem.h surface error codes (#998)
- Improvement: File copy, scan, clone, and move operations now report the underlying OS error in failure messages
Diffstat (limited to 'src/zen/cmds/service_cmd.cpp')
-rw-r--r--src/zen/cmds/service_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/zen/cmds/service_cmd.cpp b/src/zen/cmds/service_cmd.cpp
index 5e284cbdf..c43c4e614 100644
--- a/src/zen/cmds/service_cmd.cpp
+++ b/src/zen/cmds/service_cmd.cpp
@@ -500,9 +500,9 @@ ServiceCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv)
{
std::filesystem::path Destination = m_InstallPath / File.filename();
- if (!CopyFile(File, Destination, {.EnableClone = false}))
+ if (std::error_code CopyEc = CopyFile(File, Destination, {.EnableClone = false}); CopyEc)
{
- throw std::runtime_error(fmt::format("Failed to copy '{}' to '{}'", File, Destination));
+ throw std::system_error(CopyEc, fmt::format("Failed to copy '{}' to '{}'", File, Destination));
}
ZEN_INFO("Copied '{}' to '{}'", File, Destination);