LibreOffice: rename variables (conversion is generic and not PDF-specific)

This commit is contained in:
muxator 2018-11-01 00:18:26 +01:00
parent 73d09f1c6c
commit 4b8a0ff4ac

View file

@ -98,9 +98,9 @@ function doConvertTask(task, callback) {
// Move the converted file to the correct place
function(callback) {
var filename = path.basename(task.srcFile);
var pdfFilename = filename.substr(0, filename.lastIndexOf('.')) + '.' + task.type;
var pdfPath = path.join(tmpDir, pdfFilename);
fs.rename(pdfPath, task.destFile, callback);
var sourceFilename = filename.substr(0, filename.lastIndexOf('.')) + '.' + task.type;
var sourcePath = path.join(tmpDir, sourceFilename);
fs.rename(sourcePath, task.destFile, callback);
}
], function(err) {
// Invoke the callback for the local queue