Permalink
Browse files

Fix for static file logic, will not attempt to send a directory.

  • Loading branch information...
1 parent c7e8f71 commit 8588d4c9a6360cf2706362a415ca95e20ddc3115 @kieran committed Sep 5, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/app.js
View
2 lib/app.js
@@ -630,7 +630,7 @@ var App = function () {
// Decode path (e.g. %20)
staticPath = decodeURIComponent(staticPath);
- if (utils.file.existsSync(staticPath)) {
+ if ( utils.file.existsSync(staticPath) && fs.statSync(staticPath).isFile() ) {
staticResp = new response.Response(resp);
staticResp.sendFile(staticPath);
}

0 comments on commit 8588d4c

Please sign in to comment.