Skip to content

Commit

Permalink
graceful cleanup of tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
axfelix committed Jul 6, 2020
1 parent 360b253 commit b53f790
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ochre.js
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down Expand Up @@ -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";
Expand Down

0 comments on commit b53f790

Please sign in to comment.