MFC corrected arg handling: -o is not the same as --no-same-owner
-o means different things depending on the mode in order to preserve both GNU and POSIX compatibility --no-same-owner always means the same thing, regardless of other options
This commit is contained in:
parent
0ec9eae153
commit
f8775dae64
@ -139,6 +139,7 @@ enum {
|
||||
OPTION_NEWER_MTIME,
|
||||
OPTION_NEWER_MTIME_THAN,
|
||||
OPTION_NODUMP,
|
||||
OPTION_NO_SAME_OWNER,
|
||||
OPTION_NO_SAME_PERMISSIONS,
|
||||
OPTION_NULL,
|
||||
OPTION_ONE_FILE_SYSTEM,
|
||||
@ -188,7 +189,7 @@ static const struct option tar_longopts[] = {
|
||||
{ "nodump", no_argument, NULL, OPTION_NODUMP },
|
||||
{ "norecurse", no_argument, NULL, 'n' },
|
||||
{ "no-recursion", no_argument, NULL, 'n' },
|
||||
{ "no-same-owner", no_argument, NULL, 'o' },
|
||||
{ "no-same-owner", no_argument, NULL, OPTION_NO_SAME_OWNER },
|
||||
{ "no-same-permissions",no_argument, NULL, OPTION_NO_SAME_PERMISSIONS },
|
||||
{ "null", no_argument, NULL, OPTION_NULL },
|
||||
{ "one-file-system", no_argument, NULL, OPTION_ONE_FILE_SYSTEM },
|
||||
@ -422,6 +423,9 @@ main(int argc, char **argv)
|
||||
case OPTION_NODUMP: /* star */
|
||||
bsdtar->option_honor_nodump = 1;
|
||||
break;
|
||||
case OPTION_NO_SAME_OWNER: /* GNU tar */
|
||||
bsdtar->extract_flags &= ~ARCHIVE_EXTRACT_OWNER;
|
||||
break;
|
||||
case OPTION_NO_SAME_PERMISSIONS: /* GNU tar */
|
||||
/*
|
||||
* This is always the default in FreeBSD's
|
||||
|
Loading…
x
Reference in New Issue
Block a user