fix(core): update

This commit is contained in:
2021-11-30 17:40:57 +01:00
parent 992b248839
commit b1c8b4f490
3 changed files with 58 additions and 74 deletions

View File

@ -22,8 +22,8 @@ export class SmartOcr {
await originalSmartfile.write();
await this.smartshellInstance.exec(`ocrmypdf --rotate-pages ${originalPath} ${processedPath}`);
const processedSmartfile = await plugins.smartfile.Smartfile.fromFilePath(processedPath);
await plugins.smartfile.fs.remove(originalPath);
await plugins.smartfile.fs.remove(processedPath);
await originalSmartfile.delete();
await processedSmartfile.delete();
return processedSmartfile.contentBuffer;
}