Permalink
Browse files

Merge pull request #17 from tmpvar/patch-1

Remove: sys module requirement
  • Loading branch information...
mikeal committed Dec 15, 2011
2 parents bc5ed6b + 446067a commit 3ff43df540a266bebf3fd3349b35ca7f23e80b4d
Showing with 2 additions and 3 deletions.
  1. +2 −3 file/lib/main.js
View
@@ -1,6 +1,5 @@
var path = require('path');
var fs = require('fs');
-var sys = require('sys');
exports.mkdirs = function (_path, mode, callback) {
_path = exports.path.abspath(_path);
@@ -20,7 +19,7 @@ exports.mkdirs = function (_path, mode, callback) {
if (err.errno == 2) {
fs.mkdir(dir, m, function (erro) {
if (erro && erro.errno != 17) {
- sys.p(erro);
+ console.error(erro);
return cb(new Error("Failed to make " + dir + "\n" + erro));
} else {
return walk(ds, acc, m, cb);
@@ -55,7 +54,7 @@ exports.mkdirsSync = function (_path, mode) {
dirs.reduce(function (acc, d) {
acc.push(d);
var dir = acc.join("/");
-
+
try {
var stat = fs.statSync(dir);
if (!stat.isDirectory()) {

0 comments on commit 3ff43df

Please sign in to comment.