Fix ffmpeg permission denied on Linux
All checks were successful
Release / Bump version and tag (push) Successful in 3s
Release / Build App (macOS) (push) Successful in 1m31s
Release / Build App (Windows) (push) Successful in 3m25s
Release / Build App (Linux) (push) Successful in 3m28s

The bundled ffmpeg in the sidecar extract dir lacked execute permissions.
Now sets chmod 755 on Unix when find_ffmpeg locates the bundled binary.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-03-23 13:18:49 -07:00
parent 2011015c9a
commit 908762073f

View File

@@ -99,6 +99,16 @@ fn find_ffmpeg() -> Option<String> {
}; };
let ffmpeg_path = sidecar_dir.join(ffmpeg_name); let ffmpeg_path = sidecar_dir.join(ffmpeg_name);
if ffmpeg_path.exists() { if ffmpeg_path.exists() {
// Ensure execute permission on Unix
#[cfg(unix)]
{
use std::os::unix::fs::PermissionsExt;
if let Ok(meta) = std::fs::metadata(&ffmpeg_path) {
let mut perms = meta.permissions();
perms.set_mode(0o755);
let _ = std::fs::set_permissions(&ffmpeg_path, perms);
}
}
return Some(ffmpeg_path.to_string_lossy().to_string()); return Some(ffmpeg_path.to_string_lossy().to_string());
} }
} }