Skip to content

Commit

Permalink
use normalized path when comparing
Browse files Browse the repository at this point in the history
  • Loading branch information
cenkalti committed Sep 8, 2020
1 parent 9bc035c commit 4a26a63
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ require (
go.etcd.io/bbolt v1.3.5
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
golang.org/x/sys v0.0.0-20200727154430-2d971f7391a4 // indirect
golang.org/x/text v0.3.3
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,8 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
Expand Down
2 changes: 2 additions & 0 deletions syncfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

"github.com/putdotio/go-putio"
"github.com/putdotio/putio-sync/v2/internal/walker"
"golang.org/x/text/unicode/norm"
)

type iLocalFile interface {
Expand Down Expand Up @@ -54,6 +55,7 @@ func (f *syncFile) String() string {
func groupFiles(states []stateType, localFiles []*walker.LocalFile, remoteFiles []*walker.RemoteFile) map[string]*syncFile {
m := make(map[string]*syncFile)
initSyncFile := func(relpath string) *syncFile {
relpath = norm.NFC.String(relpath)
sf, ok := m[relpath]
if ok {
return sf
Expand Down

0 comments on commit 4a26a63

Please sign in to comment.