Skip to content

Commit

Permalink
Merge pull request #5020 from indygreg/hashsum-file-stem
Browse files Browse the repository at this point in the history
hashsum: use file_stem() instead of file_name()
  • Loading branch information
cakebaker committed Jun 29, 2023
2 parents 5b18c53 + a7f95d5 commit 610e046
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/uu/hashsum/src/hashsum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ pub fn uumain(mut args: impl uucore::Args) -> UResult<()> {
// if there is no program name for some reason, default to "hashsum"
let program = args.next().unwrap_or_else(|| OsString::from(NAME));
let binary_name = Path::new(&program)
.file_name()
.file_stem()
.unwrap_or_else(|| OsStr::new(NAME))
.to_string_lossy();

Expand Down

0 comments on commit 610e046

Please sign in to comment.