don't preserve any attributes by default
This commit is contained in:
parent
bdc1df9b6f
commit
45905e8f35
19
gcp
19
gcp
|
@ -556,7 +556,7 @@ class GCP():
|
||||||
parser.add_argument("-f", "--force", action="store_true", default=False,
|
parser.add_argument("-f", "--force", action="store_true", default=False,
|
||||||
help=_("force overwriting of existing files"))
|
help=_("force overwriting of existing files"))
|
||||||
|
|
||||||
parser.add_argument("--preserve", action="store", default='mode,ownership,timestamps',
|
parser.add_argument("--preserve", action="store", default='',
|
||||||
help=_("preserve the specified attributes"))
|
help=_("preserve the specified attributes"))
|
||||||
|
|
||||||
parser.add_argument("-L", "--dereference", action="store_true", default=False,
|
parser.add_argument("-L", "--dereference", action="store_true", default=False,
|
||||||
|
@ -614,14 +614,17 @@ class GCP():
|
||||||
if options.verbose:
|
if options.verbose:
|
||||||
logging.getLogger().setLevel(logging.DEBUG)
|
logging.getLogger().setLevel(logging.DEBUG)
|
||||||
|
|
||||||
preserve = set(options.preserve.split(','))
|
if len(options.preserve):
|
||||||
if not preserve.issubset(const_PRESERVE):
|
preserve = set(options.preserve.split(','))
|
||||||
error (_("Invalide --preserve value\nvalid values are:"))
|
if not preserve.issubset(const_PRESERVE):
|
||||||
for value in const_PRESERVE:
|
error (_("Invalide --preserve value\nvalid values are:"))
|
||||||
error('- %s' % value)
|
for value in const_PRESERVE:
|
||||||
exit(1)
|
error('- %s' % value)
|
||||||
|
exit(1)
|
||||||
|
else:
|
||||||
|
options.preserve = preserve
|
||||||
else:
|
else:
|
||||||
options.preserve = preserve
|
options.preserve=set()
|
||||||
|
|
||||||
self.__sourcesSaving(options, args)
|
self.__sourcesSaving(options, args)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue