Node 0.4 compatibility.

This commit is contained in:
Young Hahn 2011-05-26 11:04:20 -04:00
parent 227fd0ee6e
commit 210d0be7bd

View File

@ -3,7 +3,10 @@ var path = require('path'),
assert = require('assert'),
crypto = require('crypto'),
sax = require('sax'),
diff = require('./diff').diff;
diff = require('./diff').diff,
constants = ((!process.ENOENT) >= 1) ?
require('constants') :
{ ENOENT: process.ENOENT };
var helper = exports;
@ -150,7 +153,7 @@ exports.rmrf = function rmrf(p) {
}
else fs.unlinkSync(p);
} catch (err) {
if (err.errno !== process.ENOENT) throw err;
if (err.errno !== constants.ENOENT) throw err;
}
};