Merge pull request #6493 from vieux/fix_cp_mac_os

allow utimes on mac os, only lutimes isn't supported
This commit is contained in:
Michael Crosby 2014-06-19 14:00:59 -07:00
commit 9759b506eb
3 changed files with 13 additions and 5 deletions

11
system/utimes_darwin.go Normal file
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 {
if err := syscall.UtimesNano(path, ts); err != nil {
return err
}
return nil
return syscall.UtimesNano(path, ts)
}

View file

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