From cf3229423b135aaacbc7b91cb5017389e9978027 Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Sat, 25 Jan 2025 08:41:25 +0100 Subject: [PATCH] Fix create folder logic in cli.js The paths changed in d003ea01 to start with a forward slash, this broke the create folder detection logic as now it matched the first slash of the path instead of sub-folder in the path. Fix by ignoring the first character in the path. --- cli.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli.ts b/cli.ts index b9252f7..1f2dfe1 100644 --- a/cli.ts +++ b/cli.ts @@ -25,7 +25,7 @@ if (!fs.existsSync(outDir)) { } for (const page of pages) { - const dirSep = page.ref.indexOf("/"); + const dirSep = page.ref.indexOf("/", 1); if (dirSep !== -1) { const dir = `${outDir}/${page.ref.slice(0, dirSep)}`; if (!fs.existsSync(dir)) {