UT start adding WS support.

This commit is contained in:
Arthur Britto
2012-09-18 15:43:58 -07:00
parent 333da36c19
commit 908d797e7a
2 changed files with 12 additions and 3 deletions

View File

@@ -4,7 +4,7 @@ var path = require("path");
var filterErr = function(code, done) {
return function (e) {
done(e.code !== code ? e : undefined);
done(e && e.code === code ? undefined : e);
};
};
@@ -38,7 +38,7 @@ var mapOr = function(func, array, done) {
// Make a directory and sub-directories.
var mkPath = function(dirPath, mode, done) {
fs.mkdir(dirPath, typeof mode === "string" ? parseInt(mode, 8) : mode, function (e) {
if (!e || e.code === "EEXIST") {
if (!e || e.code === "EEXIST") {
// Created or already exists, done.
done();
}