mirror of
https://github.com/ONLYOFFICE/server.git
synced 2026-04-07 14:04:35 +08:00
[bug] Fix crash while applying changes to pdf
This commit is contained in:
@ -520,7 +520,6 @@ function* processDownloadFromStorage(ctx, dataConvert, cmd, task, tempDirs, auth
|
||||
});
|
||||
}
|
||||
}
|
||||
yield changeFormatToExtendedPdf(ctx, dataConvert, cmd);
|
||||
//todo rework
|
||||
if (!fs.existsSync(dataConvert.fileFrom)) {
|
||||
if (fs.existsSync(path.join(tempDirs.source, 'origin.docx'))) {
|
||||
@ -529,12 +528,16 @@ function* processDownloadFromStorage(ctx, dataConvert, cmd, task, tempDirs, auth
|
||||
dataConvert.fileFrom = path.join(tempDirs.source, 'origin.xlsx');
|
||||
} else if (fs.existsSync(path.join(tempDirs.source, 'origin.pptx'))) {
|
||||
dataConvert.fileFrom = path.join(tempDirs.source, 'origin.pptx');
|
||||
} else if (fs.existsSync(path.join(tempDirs.source, 'origin.pdf'))) {
|
||||
dataConvert.fileFrom = path.join(tempDirs.source, 'origin.pdf');
|
||||
}
|
||||
let fileFromNew = path.join(path.dirname(dataConvert.fileFrom), "Editor.bin");
|
||||
fs.renameSync(dataConvert.fileFrom, fileFromNew);
|
||||
dataConvert.fileFrom = fileFromNew;
|
||||
}
|
||||
|
||||
yield changeFormatToExtendedPdf(ctx, dataConvert, cmd);
|
||||
|
||||
if (task.getFromChanges() && !(task.getFromOrigin() || task.getFromSettings())) {
|
||||
let sha256 = yield utils.checksumFile('sha256', dataConvert.fileFrom)
|
||||
if(tenEditor['binaryChanges']) {
|
||||
|
||||
Reference in New Issue
Block a user