fix(macos): preserve approvals migration data (#93880)

Merged via squash.

Prepared head SHA: a8a0dd0cbb
Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com>
Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com>
Reviewed-by: @vincentkoc
This commit is contained in:
Vincent Koc
2026-06-17 11:57:32 +08:00
committed by GitHub
parent 508ce22468
commit a73f026c2d

View File

@@ -368,7 +368,7 @@ enum ExecApprovalsStore {
tempURL.path,
targetURL.path,
nil,
copyfile_flags_t(COPYFILE_EXCL))
copyfile_flags_t(COPYFILE_DATA | COPYFILE_EXCL))
if copied == -1 {
if errno == EEXIST {
try? FileManager().removeItem(at: tempURL)