From f6fe5c18fd5d251e148d01ed943894ad5ea565f8 Mon Sep 17 00:00:00 2001 From: Unarray <48868686+Unarray@users.noreply.github.com> Date: Wed, 23 Aug 2023 15:10:37 +0200 Subject: [PATCH] Update regex --- src/utils/parser/parser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/parser/parser.ts b/src/utils/parser/parser.ts index 264dbb4..4da4e7d 100644 --- a/src/utils/parser/parser.ts +++ b/src/utils/parser/parser.ts @@ -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) {