From 98feb1ce313324552a1092938e18aeb83906a881 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Thu, 30 Jun 2011 23:53:08 +0200 Subject: fixed static directory handling --- lib/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/main.js b/lib/main.js index 191dbaa..70e561b 100644 --- a/lib/main.js +++ b/lib/main.js @@ -82,8 +82,8 @@ function serveStaticFiles(res, filepath) { var file = path.join(base, filepath); if (checkPath(file, base)) { - path.exists(file, function(exists) { - if (exists) { + fs.lstat(file, function(err, stat) { + if (stat.isFile()) { var ext = path.extname(file); var contentType = getContentType(ext); -- cgit v1.2.3