Skip to content

Commit

Permalink
prevent processing twice a file with empty body
Browse files Browse the repository at this point in the history
  • Loading branch information
WengerK committed Apr 26, 2024
1 parent 1b0d4cd commit 7a54542
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public function warmup(
// Load the already OCR'ed file if possible.
$body = $this->localFileStorage->load($file, 'eng+fra');

if (!$body || $force) {
if ($body === NULL || $force) {
// When the OCR'ed file is not available, then run Tika over it
// and store it for the next run.
$body = $this->fileToText->fromFileToText($file, 'eng+fra');
Expand Down

0 comments on commit 7a54542

Please sign in to comment.