If -nc and -k are used at the same time, use only the latter

This commit is contained in:
Giuseppe Scrivano 2010-12-09 13:27:17 +01:00
parent 8e742d05cf
commit cdfd8a8e91
2 changed files with 14 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2010-12-09 Giuseppe Scrivano <gscrivano@gnu.org>
* main.c (main): If --no-clobber and --convert-links are used at the
same time, use only the latter.
Reported by: Romain Vimont <rom@rom1v.com>
2010-12-07 Jessica McKellar <jesstess@mit.edu> (tiny change)
* main.c: Make help message clearer.

View File

@ -1060,6 +1060,14 @@ main (int argc, char **argv)
/* All user options have now been processed, so it's now safe to do
interoption dependency checks. */
if (opt.noclobber && opt.convert_links)
{
fprintf (stderr,
_("Both --no-clobber and --convert-links were specified,"
"only --convert-links will be used.\n"));
opt.noclobber = false;
}
if (opt.reclevel == 0)
opt.reclevel = INFINITE_RECURSION; /* see recur.h for commentary */