mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
deps: cherry-pick libuv/libuv@439a54b
Original commit message:
unix: treat futimens() as best-effort in copyfile
futimens() may fail with EPERM on CIFS/SMB shares that do not
support setting timestamps. Since preserving timestamps during
copyfile is best-effort, ignore the return value unconditionally.
Refs: https://github.com/libuv/libuv/pull/4396
Fixes: https://github.com/nodejs/node/issues/56248
PR-URL: https://github.com/nodejs/node/pull/62881
Refs: https://github.com/libuv/libuv/pull/5053
Refs: https://github.com/libuv/libuv/pull/4396
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
This commit is contained in:
1 parent
1a60851734
commit
01dfe5961c
1 file changed
+1
-4
Vendored
+1
-4
@@ -1324,10 +1324,7 @@ static ssize_t uv__fs_copyfile(uv_fs_t* req) {
|
||||
times[1] = src_statsbuf.st_mtim;
|
||||
#endif
|
||||
|
||||
if (futimens(dstfd, times) == -1) {
|
||||
err = UV__ERR(errno);
|
||||
goto out;
|
||||
}
|
||||
(void) futimens(dstfd, times);
|
||||
|
||||
/*
|
||||
* Change the ownership and permissions of the destination file to match the
|
||||
|
||||
Reference in new issue
Block a user