binext: fix crash on non-existent exiftool

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/653/head
Varun Patil 2023-04-24 22:54:53 -07:00
parent 900b218294
commit 5eb6115680
1 changed files with 3 additions and 4 deletions

View File

@ -131,11 +131,10 @@ class BinExt
// get target file path
$path = realpath(__DIR__."/../../exiftool-bin/exiftool-{$arch}-{$libc}");
// Set config
Util::setSystemConfig('memories.exiftool', $path);
// make sure it exists
if (file_exists($path)) {
if ($path && file_exists($path)) {
Util::setSystemConfig('memories.exiftool', $path);
return $path;
}
}