mirror of
https://github.com/onionshare/onionshare.git
synced 2025-08-07 13:52:49 -04:00
Move the cleanup() function from Onionshare class to Web class, so that the list of files to be cleaned up is always available (needed for website temp files)
This commit is contained in:
parent
e48b300ff9
commit
ff5e73a2ae
10 changed files with 40 additions and 38 deletions
|
@ -442,7 +442,6 @@ def main(cwd=None):
|
|||
print("Compressing files.")
|
||||
try:
|
||||
web.share_mode.set_file_info(filenames)
|
||||
app.cleanup_filenames += web.share_mode.cleanup_filenames
|
||||
except OSError as e:
|
||||
print(e.strerror)
|
||||
sys.exit(1)
|
||||
|
@ -536,7 +535,7 @@ def main(cwd=None):
|
|||
web.stop(app.port)
|
||||
finally:
|
||||
# Shutdown
|
||||
app.cleanup()
|
||||
web.cleanup()
|
||||
onion.cleanup()
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue