Added a "Yes to all" option to User Data Transfer
This commit is contained in:
parent
a7451f86ba
commit
30dcd8758e
1 changed files with 13 additions and 5 deletions
|
|
@ -393,11 +393,19 @@ def scan_source(source_obj, dest_path, rel_path='', interactive=True):
|
||||||
if not interactive:
|
if not interactive:
|
||||||
print_success('Auto-Selected: {}'.format(item.path))
|
print_success('Auto-Selected: {}'.format(item.path))
|
||||||
root_items.append('{}'.format(item.path))
|
root_items.append('{}'.format(item.path))
|
||||||
elif ask('Extract: "{}{}{}" ?'.format(
|
else:
|
||||||
rel_path,
|
prompt = 'Transfer: "{}{}{}" ?'.format(
|
||||||
os.sep if rel_path else '',
|
rel_path,
|
||||||
item.name)):
|
os.sep if rel_path else '',
|
||||||
root_items.append('{}'.format(item.path))
|
item.name)
|
||||||
|
choices = ['Yes', 'No', 'All', 'Quit']
|
||||||
|
answer = choice(prompt=prompt, choices=choices)
|
||||||
|
if answer == 'Quit':
|
||||||
|
abort()
|
||||||
|
elif answer == 'All':
|
||||||
|
interactive = False
|
||||||
|
if answer in ['Yes', 'All']:
|
||||||
|
root_items.append('{}'.format(item.path))
|
||||||
if REGEX_WINDOWS_OLD.search(item.name):
|
if REGEX_WINDOWS_OLD.search(item.name):
|
||||||
item.name = '{}{}{}'.format(
|
item.name = '{}{}{}'.format(
|
||||||
rel_path,
|
rel_path,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue