Permalink
Browse files

Forgot to remove a + instead of a path join

  • Loading branch information...
1 parent 7808b7a commit 92ea46d23cee6cfc0f3224c25358d59e902c82bd Devin Torres committed Mar 27, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/node-router.js
View
@@ -311,7 +311,7 @@ exports.staticDirHandler = function(root, prefix) {
if (prefix) filename = filename.replace(new RegExp('^'+prefix), '');
// make sure nobody can explore our local filesystem
filename = path.join(root, filename.replace(/\.\./g, '.'));
- if (filename == root) filename = path.join(root + 'index.html');
+ if (filename == root) filename = path.join(root, 'index.html');
loadResponseData(req, res, filename, function(headers, body, encoding) {
res.writeHead(200, headers);
res.write(body, encoding);

0 comments on commit 92ea46d

Please sign in to comment.