Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit a122d55

Browse files
the8472Mark-Simulacrum
authored andcommitted
[beta] always disable copy_file_range to avoid EOVERFLOW errors
1 parent bd26e4e commit a122d55

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1209,7 +1209,7 @@ pub fn copy(from: &Path, to: &Path) -> io::Result<u64> {
12091209

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

12141214
unsafe fn copy_file_range(
12151215
fd_in: libc::c_int,

0 commit comments

Comments
 (0)