Skip to content

Commit b53f521

Browse files
authored
Strip glob patterns from include basePath (#1004)
1 parent 7bcea23 commit b53f521

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/vfs/utilities.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ func getIncludeBasePath(absolute string) string {
248248
return tspath.RemoveTrailingDirectorySeparator(tspath.GetDirectoryPath(absolute))
249249
}
250250
}
251-
return absolute[:strings.LastIndex(absolute, string(tspath.DirectorySeparator))]
251+
return absolute[:max(strings.LastIndex(absolute[:wildcardOffset], string(tspath.DirectorySeparator)), 0)]
252252
}
253253

254254
// getBasePaths computes the unique non-wildcard base paths amongst the provided include patterns.

0 commit comments

Comments
 (0)