Skip to content

IgnoreFile compares file paths in a case-sensitive way on windows/macOS #235478

@benibenj

Description

@benibenj

IgnoreFile checks if a path belongs to a folder in the following way:

if (!path.startsWith(dirPath)) { return false; }

This does not take into account that paths are not case-sensitive on windows and macOS. Should it?

const isPathIgnored = (path: string, isDir: boolean) => {
if (!path.startsWith(dirPath)) { return false; }
if (isDir && isDirIgnored(path) && !isDirIncluded(path)) { return true; }
if (isFileIgnored(path) && !isFileIncluded(path)) { return true; }
if (parent) { return parent.isPathIgnored(path, isDir); }
return false;
};

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable bugsearchSearch widget and operation issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions