Skip to content

Commit

Permalink
add a single trailing slash to directory name
Browse files Browse the repository at this point in the history
  • Loading branch information
AJ ONeal committed Aug 13, 2018
1 parent 79d5572 commit 2f07272
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ serveIndex.json = function _json(req, res, directory, nodes) {

serveIndex.plain = function _plain(req, res, dir, files) {
var directory = {
name: dir.name.replace(/\/$/, '\/')
name: dir.name.replace(/\/?$/, '\/')
};

// include size and date
Expand Down

0 comments on commit 2f07272

Please sign in to comment.