binext: allow empty exiftool path (#601)
Signed-off-by: Varun Patil <radialapps@gmail.com>pull/653/head
parent
fb4dad9bbe
commit
a8aaece932
|
@ -264,6 +264,7 @@ class OtherController extends GenericApiController
|
|||
bool $testIfFile = true,
|
||||
bool $testIfExecutable = true
|
||||
): string {
|
||||
if ($testIfFile) {
|
||||
if ($path instanceof \Closure) {
|
||||
try {
|
||||
$path = $path();
|
||||
|
@ -272,12 +273,9 @@ class OtherController extends GenericApiController
|
|||
}
|
||||
}
|
||||
|
||||
if (!\is_string($path)) {
|
||||
if (!\is_string($path) || !is_file($path)) {
|
||||
return 'not_found';
|
||||
}
|
||||
|
||||
if ($testIfFile && !is_file($path)) {
|
||||
return 'not_found';
|
||||
}
|
||||
|
||||
if ($testIfExecutable && !is_executable($path)) {
|
||||
|
|
|
@ -33,7 +33,7 @@ class BinExt
|
|||
|
||||
if ($copy) {
|
||||
if (empty($path)) {
|
||||
throw new \Exception('binary path is empty (run occ maintenance:repair)');
|
||||
throw new \Exception('binary path is empty (run occ maintenance:repair or use system perl)');
|
||||
}
|
||||
|
||||
if (!copy($path, $target)) {
|
||||
|
|
Loading…
Reference in New Issue