Disallow --exact with --overlay=strip.
This commit is contained in:
+12
-10
@@ -237,12 +237,24 @@ void check_options(int i, int argc)
|
|||||||
{
|
{
|
||||||
assert(i <= argc);
|
assert(i <= argc);
|
||||||
|
|
||||||
|
if (opt->cmd != CMD_COMPRESS)
|
||||||
|
{
|
||||||
|
// invalidate compression options
|
||||||
|
opt->method = 0;
|
||||||
|
opt->level = 0;
|
||||||
|
opt->exact = 0;
|
||||||
|
opt->small = 0;
|
||||||
|
opt->crp.reset();
|
||||||
|
}
|
||||||
|
|
||||||
// set default overlay action
|
// set default overlay action
|
||||||
if (!(opt->cmd == CMD_COMPRESS || opt->cmd == CMD_DECOMPRESS))
|
if (!(opt->cmd == CMD_COMPRESS || opt->cmd == CMD_DECOMPRESS))
|
||||||
opt->overlay = opt->COPY_OVERLAY;
|
opt->overlay = opt->COPY_OVERLAY;
|
||||||
else if (opt->overlay < 0)
|
else if (opt->overlay < 0)
|
||||||
opt->overlay = opt->COPY_OVERLAY;
|
opt->overlay = opt->COPY_OVERLAY;
|
||||||
|
|
||||||
|
check_not_both(opt->exact, opt->overlay == opt->STRIP_OVERLAY, "--exact", "--overlay=strip");
|
||||||
|
|
||||||
// set default backup option
|
// set default backup option
|
||||||
if (opt->backup < 0)
|
if (opt->backup < 0)
|
||||||
opt->backup = 0;
|
opt->backup = 0;
|
||||||
@@ -1421,16 +1433,6 @@ int __acc_cdecl_main main(int argc, char *argv[])
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (opt->cmd != CMD_COMPRESS)
|
|
||||||
{
|
|
||||||
// invalidate compression options
|
|
||||||
opt->method = 0;
|
|
||||||
opt->level = 0;
|
|
||||||
opt->exact = 0;
|
|
||||||
opt->small = 0;
|
|
||||||
opt->crp.reset();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* check options */
|
/* check options */
|
||||||
if (argc == 1)
|
if (argc == 1)
|
||||||
e_help();
|
e_help();
|
||||||
|
|||||||
Reference in New Issue
Block a user