mirror of
https://github.com/onionshare/onionshare.git
synced 2025-08-09 06:42:37 -04:00
Move downloads_dir validation into the /upload request in Web, and display an error in both CLI and GUI
This commit is contained in:
parent
c23ab77a58
commit
db7d5a6552
3 changed files with 25 additions and 17 deletions
|
@ -393,6 +393,12 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
|||
elif event["type"] == Web.REQUEST_UPLOAD_FILE_RENAMED:
|
||||
mode.handle_request_upload_file_renamed(event)
|
||||
|
||||
if event["type"] == Web.REQUEST_ERROR_DOWNLOADS_DIR_CANNOT_CREATE:
|
||||
Alert(self.common, strings._('error_cannot_create_downloads_dir').format(self.common.settings.get('downloads_dir')))
|
||||
|
||||
if event["type"] == Web.REQUEST_ERROR_DOWNLOADS_DIR_NOT_WRITABLE:
|
||||
Alert(self.common, strings._('error_downloads_dir_not_writable').format(self.common.settings.get('downloads_dir')))
|
||||
|
||||
elif event["path"] != '/favicon.ico':
|
||||
self.status_bar.showMessage('[#{0:d}] {1:s}: {2:s}'.format(mode.web.error404_count, strings._('other_page_loaded', True), event["path"]))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue