Skip to content

Commit da0795f

Browse files
committed
Bad Copilot
1 parent fc75e42 commit da0795f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

internal/project/watch.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,6 @@ func (w *WatchedFiles[T]) Clone(input T) *WatchedFiles[T] {
121121
}
122122

123123
func createResolutionLookupGlobMapper(workspaceDirectory string, currentDirectory string, useCaseSensitiveFileNames bool) func(data map[tspath.Path]string) patternsAndIgnored {
124-
rootPath := tspath.ToPath(currentDirectory, "", useCaseSensitiveFileNames)
125-
rootPathComponents := tspath.GetPathComponents(string(rootPath), "")
126124
comparePathsOptions := tspath.ComparePathsOptions{
127125
CurrentDirectory: currentDirectory,
128126
UseCaseSensitiveFileNames: useCaseSensitiveFileNames,
@@ -145,7 +143,7 @@ func createResolutionLookupGlobMapper(workspaceDirectory string, currentDirector
145143
if tspath.ContainsPath(workspaceDirectory, fileName, comparePathsOptions) {
146144
includeWorkspace = true
147145
continue
148-
} else if tspath.ContainsPath(rootPathComponents[0], fileName, comparePathsOptions) {
146+
} else if tspath.ContainsPath(currentDirectory, fileName, comparePathsOptions) {
149147
includeRoot = true
150148
continue
151149
} else {

0 commit comments

Comments
 (0)