mirror of
https://github.com/octoleo/syncthing.git
synced 2025-04-10 19:41:50 +00:00
Silence Windows chtime warnings (fixes #288)
This commit is contained in:
parent
7745ed34d3
commit
4a87221f16
@ -5,6 +5,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"runtime"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/calmh/syncthing/buffers"
|
"github.com/calmh/syncthing/buffers"
|
||||||
@ -274,7 +275,10 @@ func (p *puller) fixupDirectories() {
|
|||||||
t := time.Unix(cur.Modified, 0)
|
t := time.Unix(cur.Modified, 0)
|
||||||
err := os.Chtimes(path, t, t)
|
err := os.Chtimes(path, t, t)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if runtime.GOOS != "windows" {
|
||||||
|
// https://code.google.com/p/go/issues/detail?id=8090
|
||||||
l.Warnf("Restoring folder modtime: %q: %v", path, err)
|
l.Warnf("Restoring folder modtime: %q: %v", path, err)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
changed++
|
changed++
|
||||||
if debug {
|
if debug {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user