From 30dcd8758ea37088d08f9ffb14a033e4618fa310 Mon Sep 17 00:00:00 2001 From: 2Shirt <1923621+2Shirt@users.noreply.github.com> Date: Fri, 26 Jan 2018 18:35:05 -0700 Subject: [PATCH] Added a "Yes to all" option to User Data Transfer --- .bin/Scripts/functions/data.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.bin/Scripts/functions/data.py b/.bin/Scripts/functions/data.py index 3f8c4aa2..8cb1783f 100644 --- a/.bin/Scripts/functions/data.py +++ b/.bin/Scripts/functions/data.py @@ -393,11 +393,19 @@ def scan_source(source_obj, dest_path, rel_path='', interactive=True): if not interactive: print_success('Auto-Selected: {}'.format(item.path)) root_items.append('{}'.format(item.path)) - elif ask('Extract: "{}{}{}" ?'.format( - rel_path, - os.sep if rel_path else '', - item.name)): - root_items.append('{}'.format(item.path)) + else: + prompt = 'Transfer: "{}{}{}" ?'.format( + rel_path, + os.sep if rel_path else '', + 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): item.name = '{}{}{}'.format( rel_path,