Re-added 'Create ticket folder?' section
* Only asked if imaging and mounting a local device for the destination.
This commit is contained in:
parent
177bf10e2d
commit
c568668fd0
1 changed files with 15 additions and 1 deletions
|
|
@ -1004,6 +1004,7 @@ def select_path(skip_device=None):
|
||||||
# Local device
|
# Local device
|
||||||
local_device = select_device(
|
local_device = select_device(
|
||||||
skip_device=skip_device)
|
skip_device=skip_device)
|
||||||
|
s_path = ''
|
||||||
|
|
||||||
# Mount device volume(s)
|
# Mount device volume(s)
|
||||||
report = mount_volumes(
|
report = mount_volumes(
|
||||||
|
|
@ -1028,10 +1029,23 @@ def select_path(skip_device=None):
|
||||||
main_entries=vol_options,
|
main_entries=vol_options,
|
||||||
action_entries=actions)
|
action_entries=actions)
|
||||||
if selection.isnumeric():
|
if selection.isnumeric():
|
||||||
selected_path = DirObj(vol_options[int(selection)-1]['Path'])
|
s_path = vol_options[int(selection)-1]['Path']
|
||||||
elif selection == 'Q':
|
elif selection == 'Q':
|
||||||
raise GenericAbort()
|
raise GenericAbort()
|
||||||
|
|
||||||
|
# Create folder
|
||||||
|
if ask('Create ticket folder?'):
|
||||||
|
ticket_folder = get_simple_string('Please enter folder name')
|
||||||
|
s_path = os.path.join(s_path, ticket_folder)
|
||||||
|
try:
|
||||||
|
os.makedirs(s_path, exist_ok=True)
|
||||||
|
except OSError:
|
||||||
|
raise GenericError(
|
||||||
|
'Failed to create folder "{}"'.format(s_path))
|
||||||
|
|
||||||
|
# Create DirObj
|
||||||
|
selected_path = DirObj(s_path)
|
||||||
|
|
||||||
elif path_options[index]['Name'] == 'Enter manually':
|
elif path_options[index]['Name'] == 'Enter manually':
|
||||||
# Manual entry
|
# Manual entry
|
||||||
while not selected_path:
|
while not selected_path:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue