mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
Merge pull request #1310 from dvrax/chown-ref-fix
chown: change first file with --reference
This commit is contained in:
+4
-2
@@ -144,6 +144,7 @@ pub fn uumain(args: Vec<String>) -> i32 {
|
||||
return 1;
|
||||
}
|
||||
|
||||
let mut files;
|
||||
let dest_uid: Option<u32>;
|
||||
let dest_gid: Option<u32>;
|
||||
if let Some(file) = matches.opt_str("reference") {
|
||||
@@ -157,6 +158,7 @@ pub fn uumain(args: Vec<String>) -> i32 {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
files = matches.free;
|
||||
} else {
|
||||
match parse_spec(&matches.free[0]) {
|
||||
Ok((u, g)) => {
|
||||
@@ -168,9 +170,9 @@ pub fn uumain(args: Vec<String>) -> i32 {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
files = matches.free;
|
||||
files.remove(0);
|
||||
}
|
||||
let mut files = matches.free;
|
||||
files.remove(0);
|
||||
let executor = Chowner {
|
||||
bit_flag,
|
||||
dest_uid,
|
||||
|
||||
Reference in New Issue
Block a user