about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2023-09-16 12:34:43 +0200
committerAlan Pearce2023-09-16 12:34:43 +0200
commit650ba32ff86706ab51730e70d7e253b49f17a6ef (patch)
tree6aaeada0def3d871d0e0d09287702ee646a236e0
parentb88c1dc84d04ced9c1d1749a458bc938124573bd (diff)
downloadwebsite-650ba32ff86706ab51730e70d7e253b49f17a6ef.tar.lz
website-650ba32ff86706ab51730e70d7e253b49f17a6ef.tar.zst
website-650ba32ff86706ab51730e70d7e253b49f17a6ef.zip
Don't register double-slashed paths
-rw-r--r--src/index.ts2
1 files changed, 1 insertions, 1 deletions
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);
         }
       }