Skip to content

Commit 8ebac90

Browse files
committed
Minor changes for accept filename with and without /
1 parent b67bbdc commit 8ebac90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ exports.Server = function Server(bsClient, workers) {
3838
}
3939

4040
if (fs.lstatSync(filename).isDirectory()) {
41-
filename = filename + "index.html";
41+
filename = filename + (filename.lastIndexOf('/') == filename.length - 1 ? "" : "/") + "index.html";
4242
}
4343

4444
fs.readFile(filename, "binary", function(err, file) {

0 commit comments

Comments
 (0)