param.ugid.uid = -1;
param.ugid.gid = -1;
- param.chown_func = chown;
#if ENABLE_FEATURE_CHOWN_LONG_OPTIONS
applet_long_options = chown_longopts;
argv += optind;
/* This matches coreutils behavior (almost - see below) */
+ param.chown_func = chown;
if (OPT_NODEREF
/* || (OPT_RECURSE && !OPT_TRAVERSE_TOP): */
IF_DESKTOP( || (opt & (BIT_RECURSE|BIT_TRAVERSE_TOP)) == BIT_RECURSE)
parse_chown_usergroup_or_die(¶m.ugid, argv[0]);
/* Ok, ready to do the deed now */
- argv++;
- do {
+ while (*++argv) {
if (!recursive_action(*argv,
flags, /* flags */
fileAction, /* file action */
) {
retval = EXIT_FAILURE;
}
- } while (*++argv);
+ }
return retval;
}