1
Fork 0
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:
TheGoddessInari 2018-06-17 23:04:37 -07:00
parent f0859c8094
commit 7cc0f1337c

View file

@ -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));