Make it so passing in --persistent [filename] in the CLI, with no other args, will load that persistent mode settings file and start the server, without needing to do other validations like passing in a list of filenames

This commit is contained in:
Micah Lee 2019-11-02 23:32:44 -07:00
parent 1bca467ce3
commit d61fc45862
No known key found for this signature in database
GPG key ID: 403C2657CD994F73
2 changed files with 37 additions and 26 deletions

View file

@ -47,15 +47,12 @@ class OnionThread(QtCore.QThread):
self.mode.web.generate_static_url_path()
# Choose port and password early, because we need them to exist in advance for scheduled shares
self.mode.app.stay_open = not self.mode.common.settings.get(
"close_after_first_download"
)
if not self.mode.app.port:
self.mode.app.choose_port()
if not self.mode.common.settings.get("public_mode"):
if not self.mode.settings.get("general", "public"):
if not self.mode.web.password:
self.mode.web.generate_password(
self.mode.common.settings.get("password")
self.mode.settings.get("persistent", "password")
)
try: