From 160469cfb5500381377ad9ec59ac5563dd08a1c8 Mon Sep 17 00:00:00 2001 From: Maraumax Date: Wed, 7 May 2014 17:16:54 +0200 Subject: [PATCH] Fix render path for windows My windows path is "C:\Program Files\", fixed with quote. --- index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 29d8a7e..7643cff 100644 --- a/index.js +++ b/index.js @@ -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 ];