summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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);