mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-09 14:50:56 +00:00
Merge pull request #81 from filoozom/patch-1
Fix isTempName to work on Windows (fixes #80)
This commit is contained in:
commit
04a3db132f
@ -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.")
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user