瀏覽代碼

Merge branch 'release'

* release:
  lib/fs: Revert removal of \\?\ for drive letters (fixes #5695)
Jakob Borg 6 年之前
父節點
當前提交
62a6d619e7
共有 1 個文件被更改,包括 0 次插入7 次删除
  1. 0 7
      lib/fs/basicfs_watch.go

+ 0 - 7
lib/fs/basicfs_watch.go

@@ -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)