video; ensure transcoder is a file

pull/461/head
Varun Patil 2023-03-07 20:46:20 -08:00
parent 05770e5015
commit 8b2f900e50
1 changed files with 5 additions and 0 deletions

View File

@ -239,6 +239,11 @@ class VideoController extends ApiBase
throw new \Exception('Transcoder not configured'); throw new \Exception('Transcoder not configured');
} }
// Make sure transcoder exists
if (!file_exists($transcoder)) {
throw new \Exception("Transcoder not found; run occ memories video-setup! ({$transcoder})");
}
// Make transcoder executable // Make transcoder executable
if (!is_executable($transcoder)) { if (!is_executable($transcoder)) {
@chmod($transcoder, 0755); @chmod($transcoder, 0755);