mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-23 03:18:59 +00:00
This commit is contained in:
parent
eabd972667
commit
ca823bd591
@ -12,6 +12,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"runtime"
|
||||||
|
|
||||||
"github.com/syncthing/notify"
|
"github.com/syncthing/notify"
|
||||||
)
|
)
|
||||||
@ -32,6 +33,12 @@ func (f *BasicFilesystem) Watch(name string, ignore Matcher, ctx context.Context
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove `\\?\` prefix if the path is just a drive letter as a dirty
|
||||||
|
// fix for https://github.com/syncthing/syncthing/issues/5578
|
||||||
|
if runtime.GOOS == "windows" && len(absName) <= 7 && len(absName) > 4 && absName[:4] == `\\?\` {
|
||||||
|
absName = absName[4:]
|
||||||
|
}
|
||||||
|
|
||||||
outChan := make(chan Event)
|
outChan := make(chan Event)
|
||||||
backendChan := make(chan notify.EventInfo, backendBuffer)
|
backendChan := make(chan notify.EventInfo, backendBuffer)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user