Commit b7f6a6d3 authored by Dan Pascu's avatar Dan Pascu

Only remove the TLS certificate if it's in the application data directory

parent 79ec59b1
......@@ -897,10 +897,11 @@ class PreferencesWindow(base_class, ui_class):
else:
account_manager.default_account = None
try:
os.unlink(selected_account.tls.certificate.normalized)
except (AttributeError, OSError, IOError):
pass
if selected_account.tls.certificate.normalized.startswith(ApplicationData.directory):
try:
os.unlink(selected_account.tls.certificate.normalized)
except (AttributeError, OSError, IOError):
pass
selected_account.delete()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment