From 4a87221f167c6ecbebec8cc43ecaa5e553976f31 Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Wed, 28 May 2014 07:23:33 +0200 Subject: [PATCH] Silence Windows chtime warnings (fixes #288) --- model/puller.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/model/puller.go b/model/puller.go index d5010dd86..1ac29cb5c 100644 --- a/model/puller.go +++ b/model/puller.go @@ -5,6 +5,7 @@ import ( "errors" "os" "path/filepath" + "runtime" "time" "github.com/calmh/syncthing/buffers" @@ -274,7 +275,10 @@ func (p *puller) fixupDirectories() { t := time.Unix(cur.Modified, 0) err := os.Chtimes(path, t, t) if err != nil { - l.Warnf("Restoring folder modtime: %q: %v", path, err) + if runtime.GOOS != "windows" { + // https://code.google.com/p/go/issues/detail?id=8090 + l.Warnf("Restoring folder modtime: %q: %v", path, err) + } } else { changed++ if debug {