mirror of
https://github.com/onionshare/onionshare.git
synced 2024-12-29 01:06:16 -05:00
Catch the OSError in CLI mode when a file/folder can't be zipped up, and error out more gracefully
This commit is contained in:
parent
d9e6650a19
commit
f656bafd4c
@ -98,8 +98,12 @@ def main(cwd=None):
|
||||
|
||||
# Prepare files to share
|
||||
print(strings._("preparing_files"))
|
||||
web.set_file_info(filenames)
|
||||
app.cleanup_filenames.append(web.zip_filename)
|
||||
try:
|
||||
web.set_file_info(filenames)
|
||||
app.cleanup_filenames.append(web.zip_filename)
|
||||
except OSError as e:
|
||||
print(e.strerror)
|
||||
sys.exit(1)
|
||||
|
||||
# Warn about sending large files over Tor
|
||||
if web.zip_filesize >= 157286400: # 150mb
|
||||
|
Loading…
Reference in New Issue
Block a user