From ca4f10d35cd9505f2f0ad8405432ede798ef6f3a Mon Sep 17 00:00:00 2001 From: Delirious Lettuce Date: Thu, 13 Jul 2017 18:14:49 -0600 Subject: [PATCH] Delete temporary tor data directory during cleanup --- onionshare/onion.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/onionshare/onion.py b/onionshare/onion.py index efcd7ae2..aedd98c2 100644 --- a/onionshare/onion.py +++ b/onionshare/onion.py @@ -433,6 +433,13 @@ class Onion(object): self.stealth = False self.service_id = None + try: + # Delete the temporary tor data directory + self.tor_data_directory.cleanup() + except AttributeError: + # Skip if cleanup was somehow run before connect + pass + def get_tor_socks_port(self): """ Returns a (address, port) tuple for the Tor SOCKS port