Skip to content

Commit

Permalink
Constants don't exist in process. The same problem is reported follow…
Browse files Browse the repository at this point in the history
  • Loading branch information
shuwatto authored and tj committed Dec 21, 2010
1 parent fd2f67b commit 5d87133
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/express 100755 → 100644
Expand Up @@ -6,7 +6,8 @@

var fs = require('fs')
, sys = require('sys')
, exec = require('child_process').exec;
, exec = require('child_process').exec
, constants = require('constants');

/**
* Framework version.
Expand Down Expand Up @@ -360,7 +361,7 @@ function createApplicationAt(path) {

function emptyDirectory(path, fn) {
fs.readdir(path, function(err, files){
if (err && err.errno !== process.ENOENT) throw err;
if (err && err.errno !== constants.ENOENT) throw err;
fn(!files || !files.length);
});
}
Expand Down

0 comments on commit 5d87133

Please sign in to comment.