Abiword: Reset stdout buffer when starting abiword
parent
b6c2586920
commit
785b7d2b44
|
@ -29,10 +29,9 @@ let doConvertTask;
|
||||||
// on windows we have to spawn a process for each convertion,
|
// on windows we have to spawn a process for each convertion,
|
||||||
// cause the plugin abicommand doesn't exist on this platform
|
// cause the plugin abicommand doesn't exist on this platform
|
||||||
if (os.type().indexOf('Windows') > -1) {
|
if (os.type().indexOf('Windows') > -1) {
|
||||||
let stdoutBuffer = '';
|
|
||||||
|
|
||||||
doConvertTask = (task, callback) => {
|
doConvertTask = (task, callback) => {
|
||||||
const abiword = spawn(settings.abiword, [`--to=${task.destFile}`, task.srcFile]);
|
const abiword = spawn(settings.abiword, [`--to=${task.destFile}`, task.srcFile]);
|
||||||
|
let stdoutBuffer = '';
|
||||||
abiword.stdout.on('data', (data) => { stdoutBuffer += data.toString(); });
|
abiword.stdout.on('data', (data) => { stdoutBuffer += data.toString(); });
|
||||||
abiword.stderr.on('data', (data) => { stdoutBuffer += data.toString(); });
|
abiword.stderr.on('data', (data) => { stdoutBuffer += data.toString(); });
|
||||||
abiword.on('exit', (code) => {
|
abiword.on('exit', (code) => {
|
||||||
|
|
Loading…
Reference in New Issue