Switch to node v0.8.
In node v0.8, path.exists() has been moved to the fs module.
This commit is contained in:
parent
cf3388a566
commit
e3dd70ce08
2 changed files with 4 additions and 3 deletions
|
|
@ -209,7 +209,7 @@ function serveStatic(req, res, fname) {
|
|||
path.join(nname, "index.html"); /* it was a directory */
|
||||
var realname = path.join(serveStaticRoot, nname);
|
||||
var extension = path.extname(realname);
|
||||
path.exists(realname, function (exists) {
|
||||
fs.exists(realname, function (exists) {
|
||||
var resheaders = {};
|
||||
if (!exists || !extension || extension == ".html")
|
||||
resheaders["Content-Type"] = "text/html";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue