Update regex

This commit is contained in:
Unarray 2023-08-23 15:10:37 +02:00
parent b4c092460a
commit f6fe5c18fd

View file

@ -5,7 +5,7 @@ import { haveChilds } from "./parser.util";
export const filesToExplorerEntity = (files: string[], removeBasePath = "", separator: string | null = null): ExplorerEntity => {
separator = separator ?? path.sep;
const regex = new RegExp(`/^${escapeString(removeBasePath)}/`);
const regex = new RegExp(`^${escapeString(removeBasePath)}`);
const structure: ExplorerEntity = {};
for (const file of files) {