From b4c53e4474f8b4d80d4292b49138ccf5d3021b33 Mon Sep 17 00:00:00 2001 From: Benjamin Southall Date: Thu, 2 Mar 2017 11:26:51 +0900 Subject: [PATCH] Fix relative path to temporary directory for Tesseract OCR --- post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/post.php b/post.php index 1924eca4..835633b8 100644 --- a/post.php +++ b/post.php @@ -1006,7 +1006,7 @@ if (isset($_POST['delete'])) { if ($fname == 'spoiler') { // We don't have that much CPU time, do we? } else { - $tmpname = "tmp/tesseract/".rand(0,10000000); + $tmpname = __DIR__ . "/tmp/tesseract/".rand(0,10000000); // Preprocess command is an ImageMagick b/w quantization $error = shell_exec_error(sprintf($config['tesseract_preprocess_command'], escapeshellarg($fname)) . " | " .