mirror of
https://github.com/onionshare/onionshare.git
synced 2025-08-11 07:40:26 -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
|
@ -382,7 +382,7 @@ class Mode(QtWidgets.QWidget):
|
|||
except Exception:
|
||||
# Probably we had no port to begin with (Onion service didn't start)
|
||||
pass
|
||||
self.app.cleanup()
|
||||
self.web.cleanup()
|
||||
|
||||
self.stop_server_custom()
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ class CompressThread(QtCore.QThread):
|
|||
self.mode.filenames, processed_size_callback=self.set_processed_size
|
||||
)
|
||||
self.success.emit()
|
||||
self.mode.app.cleanup_filenames += (
|
||||
self.mode.web.cleanup_filenames += (
|
||||
self.mode.web.share_mode.cleanup_filenames
|
||||
)
|
||||
except OSError as e:
|
||||
|
|
|
@ -668,7 +668,7 @@ class Tab(QtWidgets.QWidget):
|
|||
if self.close_dialog.clickedButton() == self.close_dialog.accept_button:
|
||||
self.common.log("Tab", "close_tab", "close, closing tab")
|
||||
self.get_mode().stop_server()
|
||||
self.app.cleanup()
|
||||
mode.web.cleanup()
|
||||
return True
|
||||
# Cancel
|
||||
else:
|
||||
|
@ -681,4 +681,4 @@ class Tab(QtWidgets.QWidget):
|
|||
self.get_mode().web.stop(self.get_mode().app.port)
|
||||
self.get_mode().web_thread.quit()
|
||||
self.get_mode().web_thread.wait()
|
||||
self.app.cleanup()
|
||||
self.get_mode().web.cleanup()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue