Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export function getFilters(projectPath: string | undefined): Array<string> | nul
const workspacePath = workspaceFolder?.uri.path;
if (workspacePath === undefined) { return []; }

const relativePath = path!.replace(workspacePath!, "");
const relativePath = path!.replace(RegExp(workspacePath, "i")!, "");
const segments = relativePath!.split("/").filter((e) => e !== "");

/// Guard against no top level folder
Expand Down Expand Up @@ -221,7 +221,7 @@ export function getFilters(projectPath: string | undefined): Array<string> | nul
const buildFilters = parts!.map((e) => `${bottomLevelFolder}/${e}`).map((e) => {
const p = vscode.Uri.file(e).path;
if (projPath === undefined) { return p; } else {
const rel = p.replace(projPath, "");
const rel = p.replace(new RegExp(projPath, "i"), "");
const rel2 = rel.startsWith("/") ? rel.slice(1) : rel;
return rel2;
}
Expand Down