Skip to content

Commit 7efbaae

Browse files
deps,uv: use copyfile fallback for FICLONE EACCES
On Android, trying to copy a file with copy on write semantics through the UV_FS_COPYFILE_FICLONE flag can result on a EACCES error, even when copying the file is still possible. Uses the fallback on EACCES errors like it's done for other errors.
1 parent 5d382cd commit 7efbaae

File tree

1 file changed

+1
-1
lines changed
  • deps/uv/src/unix

1 file changed

+1
-1
lines changed

deps/uv/src/unix/fs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,7 @@ static ssize_t uv__fs_copyfile(uv_fs_t* req) {
841841
/* If an error occurred that the sendfile fallback also won't handle, or
842842
this is a force clone then exit. Otherwise, fall through to try using
843843
sendfile(). */
844-
if (errno != ENOTTY && errno != EOPNOTSUPP && errno != EXDEV) {
844+
if (errno != ENOTTY && errno != EOPNOTSUPP && errno != EXDEV && errno != EACCES) {
845845
err = UV__ERR(errno);
846846
goto out;
847847
} else if (req->flags & UV_FS_COPYFILE_FICLONE_FORCE) {

0 commit comments

Comments
 (0)