]> Cypherpunks repositories - gostls13.git/commit
os: make Chtimes accept empty time values to skip file time modification
authorConstantin Konstantinidis <constantinkonstantinidis@gmail.com>
Mon, 19 Oct 2020 17:19:17 +0000 (19:19 +0200)
committerGopher Robot <gobot@golang.org>
Thu, 11 May 2023 18:19:17 +0000 (18:19 +0000)
commit5a9b6432ec8b9199ce9fce9387e94195138b313f
tree48ff3ce1365fe5c46f099e36418d1b5c313768f2
parent96add980ad27faed627f26ef1ab09e8fe45d6bd1
os: make Chtimes accept empty time values to skip file time modification

Empty time value time.Time{} leaves the corresponding time of the file
unchanged.

Fixes #32558

Change-Id: I1aff42f30668ff505ecec2e9509d8f2b8e4b1b6a
Reviewed-on: https://go-review.googlesource.com/c/go/+/219638
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
18 files changed:
src/internal/syscall/unix/at_aix.go
src/internal/syscall/unix/at_js.go [new file with mode: 0644]
src/internal/syscall/unix/at_solaris.go
src/internal/syscall/unix/at_sysnum_darwin.go
src/internal/syscall/unix/at_sysnum_dragonfly.go
src/internal/syscall/unix/at_sysnum_freebsd.go
src/internal/syscall/unix/at_sysnum_linux.go
src/internal/syscall/unix/at_sysnum_netbsd.go
src/internal/syscall/unix/at_sysnum_openbsd.go
src/internal/syscall/unix/at_wasip1.go [new file with mode: 0644]
src/os/file_plan9.go
src/os/file_posix.go
src/os/file_unix.go
src/os/file_windows.go
src/os/os_test.go
src/syscall/fs_js.go
src/syscall/fs_wasip1.go
src/syscall/syscall_windows.go