summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2011-06-30 23:53:08 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2011-06-30 23:53:08 +0200
commit98feb1ce313324552a1092938e18aeb83906a881 (patch)
treeabb9cd67c677ab826620398fe4f8ac3c65221d79 /lib
parentec2f803a306c7843a8814029b5e77a9dadffd136 (diff)
downloadnode-paste-98feb1ce313324552a1092938e18aeb83906a881.tar.gz
node-paste-98feb1ce313324552a1092938e18aeb83906a881.tar.xz
node-paste-98feb1ce313324552a1092938e18aeb83906a881.zip
fixed static directory handling
Diffstat (limited to '')
-rw-r--r--lib/main.js4
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);