From da6caedb45be228535ba3ec634bc8472738c4e9c Mon Sep 17 00:00:00 2001 From: Peter 'Pita' Martischka Date: Sat, 13 Aug 2011 13:02:27 +0100 Subject: [PATCH] fixed abiword on windows --- node/utils/Abiword.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/node/utils/Abiword.js b/node/utils/Abiword.js index 3a99f56b..87bbb58d 100644 --- a/node/utils/Abiword.js +++ b/node/utils/Abiword.js @@ -24,12 +24,14 @@ var async = require("async"); var settings = require("./Settings"); var os = require('os'); +var doConvertTask; + //on windows we have to spawn a process for each convertion, cause the plugin abicommand doesn't exist on this platform if(os.type().indexOf("Windows") > -1) { var stdoutBuffer = ""; - function doConvertTask(task, callback) + doConvertTask = function(task, callback) { //span an abiword process to perform the conversion var abiword = spawn(settings.abiword, ["--to=" + task.destFile, task.srcFile]); @@ -123,7 +125,7 @@ else } } - function doConvertTask(task, callback) + doConvertTask = function(task, callback) { abiword.stdin.write("convert " + task.srcFile + " " + task.destFile + " " + task.type + "\n");