diff --git a/libcxx/src/filesystem/operations.cpp b/libcxx/src/filesystem/operations.cpp --- a/libcxx/src/filesystem/operations.cpp +++ b/libcxx/src/filesystem/operations.cpp @@ -678,7 +678,7 @@ }; CopyFileState cfs; - if (fcopyfile(read_fd.fd, write_fd.fd, cfs.state, COPYFILE_DATA) < 0) { + if (fcopyfile(read_fd.fd, write_fd.fd, cfs.state, COPYFILE_CLONE) < 0) { ec = capture_errno(); return false; }