LibreOffice: Use consistent intermediate filename
parent
ad0be9d1d2
commit
a6d5611c80
|
@ -109,15 +109,16 @@ exports.convertFile = (srcFile, destFile, type, callback) => {
|
||||||
// we need to convert to odt first, then to doc
|
// we need to convert to odt first, then to doc
|
||||||
// to avoid `Error: no export filter for /tmp/xxxx.doc` error
|
// to avoid `Error: no export filter for /tmp/xxxx.doc` error
|
||||||
if (type === 'doc') {
|
if (type === 'doc') {
|
||||||
|
const intermediateFile = destFile.replace(/\.doc$/, '.odt');
|
||||||
queue.push({
|
queue.push({
|
||||||
srcFile,
|
srcFile,
|
||||||
destFile: destFile.replace(/\.doc$/, '.odt'),
|
destFile: intermediateFile,
|
||||||
type: 'odt',
|
type: 'odt',
|
||||||
fileExtension: 'odt',
|
fileExtension: 'odt',
|
||||||
callback: () => {
|
callback: () => {
|
||||||
queue.push(
|
queue.push(
|
||||||
{
|
{
|
||||||
srcFile: srcFile.replace(/\.html$/, '.odt'),
|
srcFile: intermediateFile,
|
||||||
destFile,
|
destFile,
|
||||||
type,
|
type,
|
||||||
callback,
|
callback,
|
||||||
|
|
Loading…
Reference in New Issue