It is ok if the directory doesn't exist.

pull/468/head
Chad Weider 2012-02-19 19:46:09 -08:00
parent e0930005c3
commit 3b2a3ad324
1 changed files with 5 additions and 1 deletions

View File

@ -202,7 +202,11 @@ function statFile(filename, callback) {
if (error.code == "ENOENT") { // Stat the directory instead.
fs.stat(path.dirname(ROOT_DIR + filename), function (error, stats) {
if (error) {
if (error.code == "ENOENT") {
callback(null, null, false);
} else {
callback(error);
}
} else if (filename == 'js/require-kernel.js') {
callback(null, stats.mtime.getTime(), true);
} else {