mirror of
https://github.com/octoleo/syncthing.git
synced 2025-02-02 03:48:26 +00:00
lib/fs: Revert removal of \\?\ for drive letters (fixes #5695)
This reverts commit ca823bd591907ea6eb6625b3a0c54825c79ed7c8 from #5633. This un-fixes bug #5578.
This commit is contained in:
parent
a54d7a32d1
commit
a04fcfe749
@ -12,7 +12,6 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
|
||||
"github.com/syncthing/notify"
|
||||
)
|
||||
@ -33,12 +32,6 @@ func (f *BasicFilesystem) Watch(name string, ignore Matcher, ctx context.Context
|
||||
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)
|
||||
backendChan := make(chan notify.EventInfo, backendBuffer)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user