Fix ffmpeg permission denied on Linux
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:
@@ -99,6 +99,16 @@ fn find_ffmpeg() -> Option<String> {
|
||||
};
|
||||
let ffmpeg_path = sidecar_dir.join(ffmpeg_name);
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user