mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-31 13:07:46 +00:00
uutils: Replace file_name with file_stem in symlink applet detection.
This can get confused on Windows with powershell, where it passes .exe for symlinks.
This commit is contained in:
parent
f0859c8094
commit
7cc0f1337c
1 changed files with 1 additions and 1 deletions
|
@ -45,7 +45,7 @@ fn main() {
|
|||
// try binary name as util name.
|
||||
let args0 = args[0].clone();
|
||||
let binary = Path::new(&args0[..]);
|
||||
let binary_as_util = binary.file_name().unwrap().to_str().unwrap();
|
||||
let binary_as_util = binary.file_stem().unwrap().to_str().unwrap();
|
||||
|
||||
if let Some(&uumain) = umap.get(binary_as_util) {
|
||||
std::process::exit(uumain(args));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue