Skip to content
Permalink
Browse files

[Test Fix] Skip creating directory to save tesseract optimised images…

… if it already exist
  • Loading branch information
jvalls-axa committed Dec 11, 2019
1 parent f7a0115 commit 753848591cd1b7f27cdd8b77aba0428bd2728e64
Showing with 7 additions and 2 deletions.
  1. +4 −1 .gitignore
  2. +3 −1 server/src/input/tesseract/TesseractExtractor.ts
@@ -111,4 +111,7 @@ __pycache__
.tags

# temporary output folder in the root - by default used for temporary output storage in launch.json
tmp
tmp

# test directories containing temp data
test/assets/samples
@@ -64,7 +64,9 @@ export class TesseractExtractor extends Extractor {
private pdfToImages(pdfPath: string): string[] {
const folder = path.dirname(pdfPath).concat('/samples');
try {
fs.mkdirSync(folder);
if (!fs.existsSync(folder)) {
fs.mkdirSync(folder);
}
} catch (e) {
throw e;
}

0 comments on commit 7538485

Please sign in to comment.
You can’t perform that action at this time.