Browse code

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

Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)

Victor Vieux authored on 2014/06/18 08:19:42
Showing 3 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,11 @@
0
+package system
1
+
2
+import "syscall"
3
+
4
+func LUtimesNano(path string, ts []syscall.Timespec) error {
5
+	return ErrNotSupportedPlatform
6
+}
7
+
8
+func UtimesNano(path string, ts []syscall.Timespec) error {
9
+	return syscall.UtimesNano(path, ts)
10
+}
... ...
@@ -24,8 +24,5 @@ func LUtimesNano(path string, ts []syscall.Timespec) error {
24 24
 }
25 25
 
26 26
 func UtimesNano(path string, ts []syscall.Timespec) error {
27
-	if err := syscall.UtimesNano(path, ts); err != nil {
28
-		return err
29
-	}
30
-	return nil
27
+	return syscall.UtimesNano(path, ts)
31 28
 }
... ...
@@ -1,4 +1,4 @@
1
-// +build !linux,!freebsd
1
+// +build !linux,!freebsd,!darwin
2 2
 
3 3
 package system
4 4