Skip to content

Commit b46a8ff

Browse files
authored
Fix misplaced read semaphore (microsoft#111)
1 parent 8f483b1 commit b46a8ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/vfs/vfs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ var _ FS = (*vfs)(nil)
6969
// For paths like `c:/foo/bar`, fsys will be used as though it's rooted at `/` and the path is `/c:/foo/bar`.
7070
func FromIOFS(useCaseSensitiveFileNames bool, fsys fs.FS) FS {
7171
return &vfs{
72-
readSema: osReadSema,
7372
// !!! The passed in FS may not actually respect case insensitive file names.
7473
useCaseSensitiveFileNames: useCaseSensitiveFileNames,
7574
rootFor: func(root string) fs.FS {
@@ -95,6 +94,7 @@ func FromIOFS(useCaseSensitiveFileNames bool, fsys fs.FS) FS {
9594
func FromOS() FS {
9695
useCaseSensitiveFileNames := isFileSystemCaseSensitive()
9796
return &vfs{
97+
readSema: osReadSema,
9898
useCaseSensitiveFileNames: useCaseSensitiveFileNames,
9999
rootFor: os.DirFS,
100100
realpath: func(path string) (string, error) {

0 commit comments

Comments
 (0)