schema: include ctime, if it differs from mtime

Change-Id: Ifc511cc9abb00cee870e5d12fae86d34dd00e054
This commit is contained in:
Brad Fitzpatrick 2012-04-14 15:22:07 -07:00
parent 83727904a5
commit eaa9c427ac
1 changed files with 5 additions and 5 deletions

View File

@ -6,6 +6,7 @@ package schema
import ( import (
"os" "os"
"syscall" "syscall"
"time"
) )
var _ = syscall.Close var _ = syscall.Close
@ -27,13 +28,12 @@ func populateSchemaUnix(m map[string]interface{}, fi os.FileInfo) {
if group := getGroupFromGid(int(st.Gid)); group != "" { if group := getGroupFromGid(int(st.Gid)); group != "" {
m["unixGroup"] = group m["unixGroup"] = group
} }
/**
TODO-GO1(bradfitz): port this too.
// Include the ctime too, if it differs. // Include the ctime too, if it differs.
if ctime := fi.Ctime_ns; ctime != 0 && fi.ModTime() != fi.Ctime_ns { sec, nsec := st.Ctim.Unix()
println("ctime", sec, nsec)
ctime := time.Unix(sec, nsec)
if sec != 0 && !ctime.Equal(fi.ModTime()) {
m["unixCtime"] = RFC3339FromTime(ctime) m["unixCtime"] = RFC3339FromTime(ctime)
} }
*/
} }