From d19e2decab6d50c613f270090aa7d04b18f4c518 Mon Sep 17 00:00:00 2001 From: The8472 Date: Thu, 12 Nov 2020 23:47:37 +0100 Subject: [PATCH] [beta] always disable copy_file_range to avoid EOVERFLOW errors --- library/std/src/sys/unix/fs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/std/src/sys/unix/fs.rs b/library/std/src/sys/unix/fs.rs index 566ac0920dc8f..018582625a03a 100644 --- a/library/std/src/sys/unix/fs.rs +++ b/library/std/src/sys/unix/fs.rs @@ -1126,7 +1126,7 @@ pub fn copy(from: &Path, to: &Path) -> io::Result { // Kernel prior to 4.5 don't have copy_file_range // We store the availability in a global to avoid unnecessary syscalls - static HAS_COPY_FILE_RANGE: AtomicBool = AtomicBool::new(true); + static HAS_COPY_FILE_RANGE: AtomicBool = AtomicBool::new(false); unsafe fn copy_file_range( fd_in: libc::c_int,