Skip to content

Commit

Permalink
fix linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Chikage0o0 committed Oct 13, 2023
1 parent b600a03 commit 6f95063
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/qbittorrent/src/qbit/binary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ fn download_binary(path: impl AsRef<Path>) -> Result<()> {
let resp = reqwest::blocking::get(&link)?;
let binary = resp.bytes()?;
std::fs::create_dir_all(path.as_ref().parent().unwrap())?;
std::fs::write(path, binary)?;
std::fs::write(&path, binary)?;
#[cfg(target_os = "linux")]
{
use std::os::unix::fs::PermissionsExt;
std::fs::set_permissions(path, Permissions::from_mode(0o755))?;
std::fs::set_permissions(path, PermissionsExt::from_mode(0o755))?;
}
Ok(())
}
Expand Down

0 comments on commit 6f95063

Please sign in to comment.