diff --git a/src/unix/fs.c b/src/unix/fs.c index 88ac07312c7..fd7ae08755f 100644 --- a/src/unix/fs.c +++ b/src/unix/fs.c @@ -926,8 +926,10 @@ static ssize_t uv__fs_sendfile(uv_fs_t* req) { /* ENOSYS - it will never work */ errno = 0; copy_file_range_support = 0; - } else if (r == -1 && errno == ENOTSUP) { + } else if (r == -1 && (errno == ENOTSUP || errno == EXDEV)) { /* ENOTSUP - it could work on another file system type */ + /* EXDEV - it will not work when in_fd and out_fd are not on the same + mounted filesystem (pre Linux 5.3) */ errno = 0; } else { goto ok;