diff options
author | Alan Pearce | 2023-09-16 12:34:43 +0200 |
---|---|---|
committer | Alan Pearce | 2023-09-16 12:34:43 +0200 |
commit | 650ba32ff86706ab51730e70d7e253b49f17a6ef (patch) | |
tree | 6aaeada0def3d871d0e0d09287702ee646a236e0 /src | |
parent | b88c1dc84d04ced9c1d1749a458bc938124573bd (diff) | |
download | website-650ba32ff86706ab51730e70d7e253b49f17a6ef.tar.lz website-650ba32ff86706ab51730e70d7e253b49f17a6ef.tar.zst website-650ba32ff86706ab51730e70d7e253b49f17a6ef.zip |
Don't register double-slashed paths
Diffstat (limited to 'src')
-rw-r--r-- | src/index.ts | 2 |
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); } } |