about summary refs log tree commit diff stats
path: root/src/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/index.ts')
-rw-r--r--src/index.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/index.ts b/src/index.ts
index e35368d..10e9da1 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -49,8 +49,11 @@ function walkDirectory(root: string, dir: string) {
       walkDirectory(root, relPath + path.sep);
     } else if (stat.isFile()) {
       if (pathname === "index.html") {
-        registerFile(path.dirname(relPath), absPath, stat);
-        registerFile(path.dirname(relPath) + path.sep, absPath, stat);
+        const dir = path.dirname(relPath);
+        registerFile(dir, absPath, stat);
+        if (dir !== ".") {
+          registerFile(dir + path.sep, absPath, stat);
+        }
       }
       registerFile(relPath, absPath, stat);
     }