From 623c346c72481437fd18854c485e34b80c98052a Mon Sep 17 00:00:00 2001 From: Aqiel Oostenbrug <104417251+tue-AqielOostenbrug@users.noreply.github.com> Date: Fri, 18 Apr 2025 13:32:10 +0200 Subject: [PATCH] Escape period in filename match --- packages/utils/path.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/utils/path.ts b/packages/utils/path.ts index 16222a467a..12d3e6ee30 100644 --- a/packages/utils/path.ts +++ b/packages/utils/path.ts @@ -15,7 +15,7 @@ export function basename(path: string) { export function filename(path: string, includeDir = false) { if (!path) throw new Error('Path is empty'); - const cleanedPath = path.replace(/\/.\//i, '/'); + const cleanedPath = path.replace(/\/\.\//i, '/'); const output = includeDir ? cleanedPath : basename(cleanedPath); if (output.indexOf('.') < 0) return output;