mirror of
https://github.com/rwinkhart/sys.git
synced 2026-10-28 20:28:18 -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:
1 parent
2c41184ab0
commit
3826714b1e
3 files changed
+35
-10
No files matched your search
@@ -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