Abiword: Reset stdout buffer when starting abiword

pull/4960/head
Richard Hansen 2021-03-17 18:23:32 -04:00 committed by John McLear
parent b6c2586920
commit 785b7d2b44
1 changed files with 1 additions and 2 deletions

View File

@ -29,10 +29,9 @@ let 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) {
let stdoutBuffer = '';
doConvertTask = (task, callback) => {
const abiword = spawn(settings.abiword, [`--to=${task.destFile}`, task.srcFile]);
let stdoutBuffer = '';
abiword.stdout.on('data', (data) => { stdoutBuffer += data.toString(); });
abiword.stderr.on('data', (data) => { stdoutBuffer += data.toString(); });
abiword.on('exit', (code) => {