mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-05 08:37:31 -04:00
x/sys/unix: allow nil on unix for all variants of Utimes
Fixes golang/go#11830. Change-Id: Ie6e9f82d05b7c04092b6ee6117238873b746380e Reviewed-on: https://go-review.googlesource.com/12690 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
@@ -270,7 +270,10 @@ func Gethostname() (name string, err error) {
|
||||
return name, err
|
||||
}
|
||||
|
||||
func UtimesNano(path string, ts []Timespec) (err error) {
|
||||
func UtimesNano(path string, ts []Timespec) error {
|
||||
if ts == nil {
|
||||
return Utimes(path, nil)
|
||||
}
|
||||
if len(ts) != 2 {
|
||||
return EINVAL
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user