summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Lee <micah@micahflee.com>2019-09-20 17:35:38 -0700
committerGitHub <noreply@github.com>2019-09-20 17:35:38 -0700
commite21bf3e80b46ef19aebd0588b90d501f32e432e5 (patch)
tree394f2a20978cab7032a8605753f2817aaf2ba1d3
parent078aa63a6b2ecc8b3d114a26c38a48ffc285725e (diff)
parent670044fa56bfc807eac91d1320c85fd7aba8dfe3 (diff)
downloadonionshare-e21bf3e80b46ef19aebd0588b90d501f32e432e5.tar.gz
onionshare-e21bf3e80b46ef19aebd0588b90d501f32e432e5.zip
Merge pull request #1031 from mig5/950_persistence_fix
Persistence fix (#950)
-rw-r--r--onionshare/onion.py4
-rw-r--r--onionshare_gui/server_status.py3
2 files changed, 7 insertions, 0 deletions
diff --git a/onionshare/onion.py b/onionshare/onion.py
index 2f4ddffd..b0499449 100644
--- a/onionshare/onion.py
+++ b/onionshare/onion.py
@@ -438,6 +438,10 @@ class Onion(object):
return the onion hostname.
"""
self.common.log('Onion', 'start_onion_service')
+ # Settings may have changed in the frontend but not updated in our settings object,
+ # such as persistence. Reload the settings now just to be sure.
+ self.settings.load()
+
self.auth_string = None
if not self.supports_ephemeral:
diff --git a/onionshare_gui/server_status.py b/onionshare_gui/server_status.py
index 3a6e31cc..dbcc6ca8 100644
--- a/onionshare_gui/server_status.py
+++ b/onionshare_gui/server_status.py
@@ -240,6 +240,9 @@ class ServerStatus(QtWidgets.QWidget):
"""
# Set the URL fields
if self.status == self.STATUS_STARTED:
+ # The backend Onion may have saved new settings, such as the private key.
+ # Reload the settings before saving new ones.
+ self.common.settings.load()
self.show_url()
if self.common.settings.get('save_private_key'):