cmSystemTools: Revise MoveFileIfDifferent to return cmsys::Status

Help callers recover errors without relying on global state.
This commit is contained in:
Alex Turbov
2024-07-10 21:46:31 +04:00
committed by Brad King
parent 0a0a826b86
commit dc38f81237
2 changed files with 8 additions and 6 deletions
+2 -2
View File
@@ -211,8 +211,8 @@ public:
std::string* err = nullptr);
//! Rename a file if contents are different, delete the source otherwise
static void MoveFileIfDifferent(const std::string& source,
const std::string& destination);
static cmsys::Status MoveFileIfDifferent(const std::string& source,
const std::string& destination);
/**
* Run a single executable command