From 40e0a86315f18283a625883e6d0e29e8b125afec Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Thu, 27 Feb 2014 21:00:01 -0800 Subject: [PATCH] genfileembed: touch the file modtime, even if contents are same, but it's old Change-Id: I88d429445da6e251e4aebc0e31017e4ca8f0dd51 --- pkg/fileembed/genfileembed/genfileembed.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/fileembed/genfileembed/genfileembed.go b/pkg/fileembed/genfileembed/genfileembed.go index 4eb97530d..4db4e5d5a 100644 --- a/pkg/fileembed/genfileembed/genfileembed.go +++ b/pkg/fileembed/genfileembed/genfileembed.go @@ -169,6 +169,7 @@ func main() { func writeFileIfDifferent(filename string, contents []byte) error { fi, err := os.Stat(filename) if err == nil && fi.Size() == int64(len(contents)) && contentsEqual(filename, contents) { + os.Chtimes(filename, time.Now(), time.Now()) return nil } return ioutil.WriteFile(filename, contents, 0644)