Skip to content

SystemTools: Fix CloneFileContent copy-on-write on macOS / APFS

Nick Begg requested to merge neek78/kwsys:macos-file-clone-fix into master

filesystem’s copy-on-write features. The call to macOS’s copyfile() was changed to not use COPYFILE_CLONE some time back due to it following symlinks - which was not desired. Unfortunately (and the manpage for copyfile() really doesn’t make this clear) this disables cloning all together.

Go back to using COPYFILE_CLONE, but explicitly check for symlinks.

Verified cloning works using this tool:

See also:

Edited by Brad King

Merge request reports

Loading