From e5cc14bad07510a374eac9c3bb008c6fab9fbccf Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Thu, 24 Nov 2022 03:13:34 -0800 Subject: [PATCH] index: use realpath for test file --- lib/Command/Index.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Command/Index.php b/lib/Command/Index.php index 306b8229..8d66873f 100644 --- a/lib/Command/Index.php +++ b/lib/Command/Index.php @@ -210,8 +210,9 @@ class Index extends Command /** Make sure exiftool is available */ private function testExif() { - $testfile = __DIR__.'/../../exiftest.jpg'; - if (!file_exists($testfile)) { + $testfilepath = __DIR__.'/../../exiftest.jpg'; + $testfile = realpath($testfilepath); + if (!$testfile) { error_log("Couldn't find Exif test file {$testfile}"); return false;