unix: set errno in uv_fs_copyfile()
When the specific value of -1 is returned, uv__fs_work() uses the value of errno. This commit sets errno in uv__fs_copyfile(). Fixes: https://github.com/nodejs/node/issues/21329 PR-URL: https://github.com/libuv/libuv/pull/1881 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
parent
1a0f619530
commit
e179bd1b43
@ -929,7 +929,11 @@ out:
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
if (result == 0)
|
||||
return 0;
|
||||
|
||||
errno = UV__ERR(result);
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user