From 650ba32ff86706ab51730e70d7e253b49f17a6ef Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 16 Sep 2023 12:34:43 +0200 Subject: Don't register double-slashed paths --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 8bdc80e..261bed4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -88,7 +88,7 @@ function walkDirectory(root: string, dir: string) { if (pathname.startsWith("index.html")) { const dir = relPath.replace("index.html", ""); registerFile(relPath, dir, absPath, stat); - if (dir !== ".") { + if (dir !== "") { registerFile(relPath, dir + path.sep, absPath, stat); } } -- cgit 1.4.1