Skip to content

Commit

Permalink
Remove pointless keep folder warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Audionut committed Aug 24, 2024
1 parent cff9252 commit 0e69dd8
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,17 +471,13 @@ def get_confirmation(meta):
meta['keep_folder'] = False # Ensure 'keep_folder' is False if 'is disc' is True

if meta['isdir']:
if 'keep_folder' in meta: # Check if 'keep_folder' was explicitly set
if meta['keep_folder']: # Proceed only if 'keep_folder' is True
if 'keep_folder' in meta:
if meta['keep_folder']:
cli_ui.info_section(cli_ui.yellow, f"Uploading with --keep-folder")
kf_confirm = cli_ui.ask_yes_no("You specified --keep-folder. Uploading in folders might not be allowed. Are you sure you want to proceed?", default=False)
if not kf_confirm:
cli_ui.info('Aborting...')
exit()
else:
# Handle the scenario where 'keep_folder' was not set but 'is disc' is False
cli_ui.warning("Warning: 'keep_folder' is not set for this upload. Proceeding without folder preservation.")
# Optionally, add logic here to handle this case

cli_ui.info_section(cli_ui.yellow, f"Is this correct?")
cli_ui.info(f"Name: {meta['name']}")
Expand Down

0 comments on commit 0e69dd8

Please sign in to comment.