Skip to content

Commit

Permalink
[beta] always disable copy_file_range to avoid EOVERFLOW errors
Browse files Browse the repository at this point in the history
  • Loading branch information
the8472 committed Nov 12, 2020
1 parent 1219014 commit d19e2de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/std/src/sys/unix/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,7 @@ pub fn copy(from: &Path, to: &Path) -> io::Result<u64> {

// 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,
Expand Down

0 comments on commit d19e2de

Please sign in to comment.