1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

allow utimes on mac os, only lutimes isn't supported

Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
This commit is contained in:
Victor Vieux 2014-06-17 23:19:42 +00:00
parent d0fe1147ea
commit 04bfa8e91f
3 changed files with 13 additions and 5 deletions

View file

@ -0,0 +1,11 @@
package system
import "syscall"
func LUtimesNano(path string, ts []syscall.Timespec) error {
return ErrNotSupportedPlatform
}
func UtimesNano(path string, ts []syscall.Timespec) error {
return syscall.UtimesNano(path, ts)
}

View file

@ -24,8 +24,5 @@ func LUtimesNano(path string, ts []syscall.Timespec) error {
} }
func UtimesNano(path string, ts []syscall.Timespec) error { func UtimesNano(path string, ts []syscall.Timespec) error {
if err := syscall.UtimesNano(path, ts); err != nil { return syscall.UtimesNano(path, ts)
return err
}
return nil
} }

View file

@ -1,4 +1,4 @@
// +build !linux,!freebsd // +build !linux,!freebsd,!darwin
package system package system