From 97a0cc8b5715e8be3aee4361c41ddce21a19fc87 Mon Sep 17 00:00:00 2001 From: Superchupu <53496941+SuperchupuDev@users.noreply.github.com> Date: Tue, 1 Oct 2024 01:12:56 +0200 Subject: [PATCH] improve root inferring on non-trailing `**` patterns --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index ac354bc..b4eac71 100644 --- a/src/index.ts +++ b/src/index.ts @@ -61,7 +61,7 @@ function normalizePattern( for (let i = 0; i < Math.min(properties.commonPath.length, current.length); i++) { const part = current[i]; - if (part === '**') { + if (part === '**' && !current[i + 1]) { newCommonPath.pop(); break; }