Skip to content

Commit

Permalink
Fix render path for windows
Browse files Browse the repository at this point in the history
My windows path is "C:\Program Files\", fixed with quote.
  • Loading branch information
Maraumax committed May 7, 2014
1 parent 08fb53f commit 160469c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,13 @@ Screenshot.prototype.capture = function(fn) {
}
}

var path = __dirname + '/script/render.js';

if(/^win/.test(process.platform))
path = '"'+path+'"';

var args = [
__dirname + '/script/render.js', this.url,
path, this.url,
this._width, this._height, this._timeout, this._format
];

Expand Down

0 comments on commit 160469c

Please sign in to comment.