Skip to content

Commit d19e2de

Browse files
committed
[beta] always disable copy_file_range to avoid EOVERFLOW errors
1 parent 1219014 commit d19e2de

File tree

1 file changed

+1
-1
lines changed
  • library/std/src/sys/unix

1 file changed

+1
-1
lines changed

library/std/src/sys/unix/fs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1126,7 +1126,7 @@ pub fn copy(from: &Path, to: &Path) -> io::Result<u64> {
11261126

11271127
// Kernel prior to 4.5 don't have copy_file_range
11281128
// We store the availability in a global to avoid unnecessary syscalls
1129-
static HAS_COPY_FILE_RANGE: AtomicBool = AtomicBool::new(true);
1129+
static HAS_COPY_FILE_RANGE: AtomicBool = AtomicBool::new(false);
11301130

11311131
unsafe fn copy_file_range(
11321132
fd_in: libc::c_int,

0 commit comments

Comments
 (0)