Skip to content

Commit

Permalink
Fix incorrect executable suffix matching during extraction (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
YetAnotherClown authored Aug 9, 2024
1 parent 78d524a commit ce083ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/sources/extraction.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![allow(clippy::struct_excessive_bools)]

use std::{
env::consts::EXE_SUFFIX,
env::consts::{EXE_EXTENSION, EXE_SUFFIX},
io::{self, Read},
path::{Path, PathBuf, MAIN_SEPARATOR_STR},
};
Expand Down Expand Up @@ -96,7 +96,7 @@ impl Candidate {
file_name.is_some_and(|name| name.eq_ignore_ascii_case(desired_file_name));

let has_exec_perms = perms.map_or(false, |perms| (perms & 0o111) != 0);
let has_exec_suffix = path.extension().map_or(false, |ext| ext == EXE_SUFFIX);
let has_exec_suffix = path.extension().map_or(false, |ext| ext == EXE_EXTENSION);

Some(Self {
path: path.clone(),
Expand Down

0 comments on commit ce083ab

Please sign in to comment.