From 0e75ab66d0e9431067df5b79f4fbaadc54367aa6 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Sat, 14 Sep 2024 14:17:13 -0300 Subject: [PATCH] chore: validation setup improvement Signed-off-by: Vitor Mattos --- lib/Service/SignFileService.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Service/SignFileService.php b/lib/Service/SignFileService.php index 16b993e61b..41dfbee0af 100644 --- a/lib/Service/SignFileService.php +++ b/lib/Service/SignFileService.php @@ -577,6 +577,9 @@ private function getPdfToSign(FileEntity $fileData, File $originalFile): File { $javaPath = $this->appConfig->getAppValue('java_path'); $pdftkPath = $this->appConfig->getAppValue('pdftk_path'); + if (!file_exists($javaPath) || !file_exists($pdftkPath)) { + throw new LibresignException($this->l10n->t('The admin hasn\'t set up LibreSign yet, please wait.')); + } $pdf = new Pdf(); $command = new Command(); $command->setCommand($javaPath . ' -jar ' . $pdftkPath);