pass errors so that we have stack traces
This commit is contained in:
parent
02b4ff4008
commit
6f5d62473d
@ -148,7 +148,7 @@ External.prototype.findByExtension = function(ext, callback) {
|
||||
External.mkdirp = function mkdirP(p, mode, f) {
|
||||
var cb = f || function() {};
|
||||
if (p.charAt(0) != '/') {
|
||||
cb('Relative path: ' + p);
|
||||
cb(new Error('Relative path: ' + p));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -304,7 +304,7 @@ External.processors['.zip'] = function(ext, callback) {
|
||||
var uncompressed = path.join(destPath, name);
|
||||
External.mkdirp(path.dirname(uncompressed), 0755, function(err) {
|
||||
if (err && err.errno != constants.EEXIST) {
|
||||
callback("Couldn't create directory " + path.dirname(name));
|
||||
callback(new Error("Couldn't create directory " + path.dirname(name)));
|
||||
} else {
|
||||
// if just a directory skip ahead
|
||||
if (!path.extname(name) || name[0] === '.') {
|
||||
|
Loading…
Reference in New Issue
Block a user