Merge pull request #81 from filoozom/patch-1

Fix isTempName to work on Windows (fixes #80)
This commit is contained in:
Jakob Borg 2014-03-04 21:56:23 +01:00
commit 04a3db132f

View File

@ -8,6 +8,7 @@ import (
"os"
"path"
"path/filepath"
"runtime"
"strings"
"time"
@ -39,6 +40,9 @@ func (f File) NewerThan(o File) bool {
}
func isTempName(name string) bool {
if runtime.GOOS == "windows" {
name = filepath.ToSlash(name)
}
return strings.HasPrefix(path.Base(name), ".syncthing.")
}