Skip to content

Commit da7f2c8

Browse files
authored
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: libuv/libuv#4396 Fixes: #56248 PR-URL: #62881 Refs: libuv/libuv#5053 Refs: libuv/libuv#4396 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]>
1 parent 8f348bc commit da7f2c8

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

  • deps/uv/src/unix

deps/uv/src/unix/fs.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1324,10 +1324,7 @@ static ssize_t uv__fs_copyfile(uv_fs_t* req) {
13241324
times[1] = src_statsbuf.st_mtim;
13251325
#endif
13261326

1327-
if (futimens(dstfd, times) == -1) {
1328-
err = UV__ERR(errno);
1329-
goto out;
1330-
}
1327+
(void) futimens(dstfd, times);
13311328

13321329
/*
13331330
* Change the ownership and permissions of the destination file to match the

0 commit comments

Comments
 (0)