From b53f790a62a8373a90a45500b2c549402f4cc870 Mon Sep 17 00:00:00 2001 From: Alex Garnett Date: Mon, 6 Jul 2020 09:24:02 -0700 Subject: [PATCH] graceful cleanup of tmp --- ochre.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ochre.js b/ochre.js index 89e54bb..e395d0d 100644 --- a/ochre.js +++ b/ochre.js @@ -12,6 +12,8 @@ const remote = require('electron').remote; let client = remote.getGlobal('client'); tt({position: 'right'}) +tmp.setGracefulCleanup() + function setlocation() { let projectFolder = dialog.showOpenDialogSync({properties: ["openDirectory"]}); if (projectFolder){ @@ -41,7 +43,6 @@ function ocr() { execSync(commandJoin([path.join("win","PDFtk","bin","pdftk.exe"), pdfs, "cat", "output", joined_file])); let output = input.concat('.ocr.pdf') execSync(commandJoin([path.join("win","gs","bin","gswin64.exe"), "-sDEVICE=pdfwrite", "-sPAPERSIZE=letter", "-dFIXEDMEDIA", "-dPDFFitPage", "-o", output, joined_file])); - tempdirObject.removeCallback(); }); }); buttonBlock.style.display = "block";