summaryrefslogtreecommitdiff
path: root/Source/Core/UpdaterCommon/UpdaterCommon.cpp
diff options
context:
space:
mode:
authorOatmealDome <julian@oatmealdome.me>2021-06-30 02:16:37 -0400
committerOatmealDome <julian@oatmealdome.me>2021-06-30 02:16:37 -0400
commitdd5e0c6e153015e428d2ce246ae77c2e20aed678 (patch)
tree17a58290853eb923f9152c866976c35e1f5e2cac /Source/Core/UpdaterCommon/UpdaterCommon.cpp
parent6042df71d934b0efa9dcb64f47e77a02a1e3cb96 (diff)
UpdaterCommon: Move the updated file instead of copying
This prevents macOS from reading an old (cached) code signature on Mach-O executables.
Diffstat (limited to 'Source/Core/UpdaterCommon/UpdaterCommon.cpp')
-rw-r--r--Source/Core/UpdaterCommon/UpdaterCommon.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/UpdaterCommon/UpdaterCommon.cpp b/Source/Core/UpdaterCommon/UpdaterCommon.cpp
index f52755aeb5..99dd62a0d9 100644
--- a/Source/Core/UpdaterCommon/UpdaterCommon.cpp
+++ b/Source/Core/UpdaterCommon/UpdaterCommon.cpp
@@ -460,7 +460,7 @@ bool UpdateFiles(const std::vector<TodoList::UpdateOp>& to_update,
std::string content_filename = HexEncode(op.new_hash.data(), op.new_hash.size());
fprintf(log_fp, "Updating file %s from content %s...\n", op.filename.c_str(),
content_filename.c_str());
- if (!File::Copy(temp_path + DIR_SEP + content_filename, path))
+ if (!File::Rename(temp_path + DIR_SEP + content_filename, path))
{
fprintf(log_fp, "Could not update file %s.\n", op.filename.c_str());
return false;