Skip to content

Commit

Permalink
Add check on empty folder
Browse files Browse the repository at this point in the history
  • Loading branch information
drew2a committed Dec 1, 2022
1 parent a2a0bb8 commit 1aff210
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/tribler/gui/dialogs/startdownloaddialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,12 @@ def on_download_clicked(self, checked):
)
else:
download_dir = self.dialog_widget.destination_input.currentText()
self.logger.info(f'Download folder: {download_dir}')
if not download_dir:
text = tr("Please specify the path to the download directory")
title = tr("The download directory is empty")
ConfirmationDialog.show_message(self.dialog_widget, title, text, "OK")
return
is_writable, error = is_dir_writable(download_dir)
if not is_writable:
gui_error_message = tr(
Expand Down

0 comments on commit 1aff210

Please sign in to comment.