diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2011-06-30 23:53:08 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2011-06-30 23:53:08 +0200 |
commit | 98feb1ce313324552a1092938e18aeb83906a881 (patch) | |
tree | abb9cd67c677ab826620398fe4f8ac3c65221d79 | |
parent | ec2f803a306c7843a8814029b5e77a9dadffd136 (diff) | |
download | node-paste-98feb1ce313324552a1092938e18aeb83906a881.tar.gz node-paste-98feb1ce313324552a1092938e18aeb83906a881.tar.xz node-paste-98feb1ce313324552a1092938e18aeb83906a881.zip |
fixed static directory handling
-rw-r--r-- | lib/main.js | 4 |
1 files 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); |