mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-04 15:07:47 +00:00
chown: change first file with --reference
This commit is contained in:
parent
be91d50361
commit
7625878cd7
1 changed files with 4 additions and 2 deletions
|
@ -144,6 +144,7 @@ pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let mut files;
|
||||||
let dest_uid: Option<u32>;
|
let dest_uid: Option<u32>;
|
||||||
let dest_gid: Option<u32>;
|
let dest_gid: Option<u32>;
|
||||||
if let Some(file) = matches.opt_str("reference") {
|
if let Some(file) = matches.opt_str("reference") {
|
||||||
|
@ -157,6 +158,7 @@ pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
files = matches.free;
|
||||||
} else {
|
} else {
|
||||||
match parse_spec(&matches.free[0]) {
|
match parse_spec(&matches.free[0]) {
|
||||||
Ok((u, g)) => {
|
Ok((u, g)) => {
|
||||||
|
@ -168,9 +170,9 @@ pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
files = matches.free;
|
||||||
let mut files = matches.free;
|
|
||||||
files.remove(0);
|
files.remove(0);
|
||||||
|
}
|
||||||
let executor = Chowner {
|
let executor = Chowner {
|
||||||
bit_flag,
|
bit_flag,
|
||||||
dest_uid,
|
dest_uid,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue