download
Advanced tools
Comparing version 1.0.6 to 1.0.7
11
index.js
@@ -27,3 +27,3 @@ 'use strict'; | ||
this.opts.encoding = null; | ||
this.opts.mode = parseInt(this.opts.mode, 8) || null; | ||
this.opts.mode = this.opts.mode || null; | ||
this.opts.proxy = process.env.HTTPS_PROXY || | ||
@@ -124,3 +124,3 @@ process.env.https_proxy || | ||
self._run(res); | ||
self._run(res, obj); | ||
}) | ||
@@ -170,7 +170,8 @@ | ||
* @param {Object} res | ||
* @param {Object} file | ||
* @api public | ||
*/ | ||
Download.prototype._run = function (res) { | ||
this.ware.run(res, this); | ||
Download.prototype._run = function (res, file) { | ||
this.ware.run(res, file); | ||
}; | ||
@@ -196,3 +197,3 @@ | ||
if (opts.mode) { | ||
return fs.chmod(dest, opts.mode, function (err) { | ||
return fs.chmod(dest, parseInt(opts.mode, 8), function (err) { | ||
if (err) { | ||
@@ -199,0 +200,0 @@ cb(err); |
{ | ||
"name": "download", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "Download and extract files effortlessly", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
8003
198