File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -37,8 +37,8 @@ fn parse_gid_from_str(group: &str) -> Result<u32, String> {
3737 }
3838}
3939
40- fn parse_gid_and_uid ( matches : & ArgMatches ) -> UResult < GidUidOwnerFilter > {
41- let mut raw_group: String = String :: new ( ) ;
40+ fn get_dest_gid ( matches : & ArgMatches ) -> UResult < ( Option < u32 > , String ) > {
41+ let mut raw_group = String :: new ( ) ;
4242 let dest_gid = if let Some ( file) = matches. get_one :: < String > ( options:: REFERENCE ) {
4343 fs:: metadata ( file)
4444 . map ( |meta| {
@@ -62,6 +62,11 @@ fn parse_gid_and_uid(matches: &ArgMatches) -> UResult<GidUidOwnerFilter> {
6262 }
6363 }
6464 } ;
65+ Ok ( ( dest_gid, raw_group) )
66+ }
67+
68+ fn parse_gid_and_uid ( matches : & ArgMatches ) -> UResult < GidUidOwnerFilter > {
69+ let ( dest_gid, raw_group) = get_dest_gid ( matches) ?;
6570
6671 // Handle --from option
6772 let filter = if let Some ( from_group) = matches. get_one :: < String > ( options:: FROM ) {
You can’t perform that action at this time.
0 commit comments