Skip to content

Commit

Permalink
fix Windows code
Browse files Browse the repository at this point in the history
  • Loading branch information
Xaeroxe committed Jul 30, 2024
1 parent d6a1416 commit ba36812
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
13 changes: 11 additions & 2 deletions src/checker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,22 @@ impl Checker for ExistedChecker {
.map(|metadata| {
let file_type = metadata.file_type();
#[cfg(feature = "tracing")]
tracing::trace!("{} is_file() = {}, is_symlink() = {}", new_path.display(), file_type.is_file(), file_type.is_symlink());
tracing::trace!(
"{} is_file() = {}, is_symlink() = {}",
path.display(),
file_type.is_file(),
file_type.is_symlink()
);
file_type.is_file() || file_type.is_symlink()
})
.unwrap_or(false)
&& (path.extension().is_some() || matches_arch(path));
#[cfg(feature = "tracing")]
tracing::trace!("{} has_extension = {}, ExistedChecker::is_valid() = {ret}", path.display(), path.extension().is_some());
tracing::trace!(
"{} has_extension = {}, ExistedChecker::is_valid() = {ret}",
path.display(),
path.extension().is_some()
);
ret
}

Expand Down
5 changes: 3 additions & 2 deletions src/finder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,10 @@ impl Finder {
// Append the extension.
let mut p = p.clone().into_os_string();
p.push(e);
let ret = PathBuf::from(p);
#[cfg(feature = "tracing")]
tracing::trace!("possible extension: {}", p.display());
PathBuf::from(p)
tracing::trace!("possible extension: {}", ret.display());
ret
})),
)
}
Expand Down

0 comments on commit ba36812

Please sign in to comment.