提交 fa91b71e 编写于 作者: I isidor

Files exclude setting allow specifying root name in the relative path

fixes #70438
上级 09021f9c
......@@ -325,8 +325,8 @@ export class FilesFilter implements ITreeFilter<ExplorerItem, FuzzyScore> {
// Hide those that match Hidden Patterns
const cached = this.hiddenExpressionPerRoot.get(stat.root.resource.toString());
if (cached && cached.parsed(path.normalize(path.relative(stat.root.resource.path, stat.resource.path)), stat.name, name => !!(stat.parent && stat.parent.getChild(name)))) {
// review (isidor): is path.normalize necessary? path.relative already returns an os path
const relativeTo = this.contextService.getWorkbenchState() === WorkbenchState.WORKSPACE ? path.dirname(stat.root.resource.path) : stat.root.resource.path;
if (cached && cached.parsed(path.relative(relativeTo, stat.resource.path), stat.name, name => !!(stat.parent && stat.parent.getChild(name)))) {
return false; // hidden through pattern
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册