mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
chown: Add crate walkdir
This commit is contained in:
parent
04d7f81fd3
commit
d4b2766c4b
2 changed files with 3 additions and 1 deletions
|
@ -12,7 +12,7 @@ getopts = "*"
|
|||
glob = "*"
|
||||
libc = "*"
|
||||
uucore = { path="../uucore" }
|
||||
clippy = {version = "*", optional = true}
|
||||
walkdir = "0.1"
|
||||
|
||||
[[bin]]
|
||||
name = "chown"
|
||||
|
|
|
@ -18,6 +18,7 @@ macro_rules! gen_func {
|
|||
if !data.is_null() {
|
||||
return Ok(id);
|
||||
} else {
|
||||
// last_os_error() returns success
|
||||
return Err(Error::new(ErrorKind::NotFound, format!("No such id `{}`", id)));
|
||||
}
|
||||
} else {
|
||||
|
@ -30,6 +31,7 @@ macro_rules! gen_func {
|
|||
ptr::read(data).$field
|
||||
});
|
||||
} else {
|
||||
// last_os_error() returns success
|
||||
return Err(Error::new(ErrorKind::NotFound, format!("No such name `{}`", name_or_id)));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue