mirror of
https://github.com/uutils/coreutils
synced 2024-11-14 08:57:13 +00:00
Update basename for latest rustc
This commit is contained in:
parent
c50e475c6b
commit
aa889f6bae
2 changed files with 5 additions and 5 deletions
2
Makefile
2
Makefile
|
@ -9,6 +9,7 @@ RMFLAGS :=
|
|||
# Possible programs
|
||||
PROGS := \
|
||||
base64 \
|
||||
basename \
|
||||
cat \
|
||||
dirname \
|
||||
echo \
|
||||
|
@ -24,7 +25,6 @@ PROGS := \
|
|||
wc \
|
||||
whoami \
|
||||
yes \
|
||||
basename \
|
||||
|
||||
BUILD ?= $(PROGS)
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#[link(name="basename", vers="1.0.0", author="Jimmy Lu")];
|
||||
#[crate_id(name="basename", vers="1.0.0", author="Jimmy Lu")];
|
||||
|
||||
/*
|
||||
* This file is part of the uutils coreutils package.
|
||||
|
@ -36,8 +36,8 @@ fn main() {
|
|||
let matches = match groups::getopts(args.tail(), opts) {
|
||||
Ok(m) => m,
|
||||
Err(f) => {
|
||||
let stderr = stderr();
|
||||
stderr.write_str(program + ": " + f.to_err_msg() + "\n");
|
||||
writeln!(&mut stderr() as &mut Writer,
|
||||
"Invalid options\n{}", f.to_err_msg());
|
||||
os::set_exit_status(1);
|
||||
return;
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ fn main() {
|
|||
fn strip_dir(fullname :&~str) -> ~str {
|
||||
let mut name = ~"";
|
||||
|
||||
for c in fullname.rev_iter() {
|
||||
for c in fullname.chars_rev() {
|
||||
if c == '/' || c == '\\' {
|
||||
return name;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue