Permalink
Browse files

It is ok if the directory doesn't exist.

  • Loading branch information...
1 parent e093000 commit 3b2a3ad32414ef2ca261484ffb36337409385fea @cweider committed Feb 20, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 node/utils/Minify.js
@@ -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) {
- callback(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 {

0 comments on commit 3b2a3ad

Please sign in to comment.