From 8d21c268c233afb72879a4f1f74e909b9ab90fe4 Mon Sep 17 00:00:00 2001 From: csd4ni3l Date: Thu, 5 Mar 2026 21:41:08 +0100 Subject: [PATCH] Fix yt-dlp binary not having the right permissions after download --- src/yt_dlp.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/yt_dlp.rs b/src/yt_dlp.rs index ea5841b..457598a 100644 --- a/src/yt_dlp.rs +++ b/src/yt_dlp.rs @@ -1,4 +1,4 @@ -use std::{env::current_dir, fs::{File, exists}, io, process::Command}; +use std::{env::current_dir, fs::{File, exists}, io, os::unix::fs::PermissionsExt, process::Command}; use reqwest; use rfd::{MessageButtons, MessageDialog, MessageDialogResult}; @@ -40,6 +40,8 @@ pub fn check_and_download_yt_dlp() { let mut body = reqwest::blocking::get(url).expect("Could not download yt-dlp"); let mut out = File::create(get_yt_dlp_path()).expect("failed to create file"); io::copy(&mut body, &mut out).expect("failed to copy content"); + out.set_permissions(PermissionsExt::from_mode(0o755)); + } pub fn check_ffmpeg() -> bool{