Skip to content

Commit

Permalink
fix: resolve not a directory on mac m1
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanbabcock committed Oct 9, 2023
1 parent e2b9186 commit 545df47
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,9 @@ pub fn unpack_ffmpeg(from_archive: &PathBuf, binary_folder: &Path) -> Result<()>
// Move binaries
let (ffmpeg, ffplay, ffprobe) = if cfg!(all(target_os = "macos", target_arch = "x86_64")) {
(
temp_folder.join("ffmpeg"),
temp_folder.join("ffplay"), // <-- no ffplay on mac m1
temp_folder.join("ffprobe"), // <-- no ffprobe on mac m1
temp_folder.join("./ffmpeg"),
temp_folder.join("./ffplay"), // <-- no ffplay on mac m1
temp_folder.join("./ffprobe"), // <-- no ffprobe on mac m1
)
} else if cfg!(target_os = "windows") {
let inner_folder = read_dir(&temp_folder)?
Expand Down Expand Up @@ -235,7 +235,7 @@ pub fn unpack_ffmpeg(from_archive: &PathBuf, binary_folder: &Path) -> Result<()>
}

// Delete archive and unpacked files
if temp_folder.exists() {
if temp_folder.exists() && temp_folder.is_dir() {
remove_dir_all(&temp_folder)?;
}

Expand Down

0 comments on commit 545df47

Please sign in to comment.