mirror of
https://github.com/onionshare/onionshare.git
synced 2024-12-23 22:39:41 -05:00
Fix finding tor binary paths in Windows
This commit is contained in:
parent
bd12949652
commit
f4fb212dbc
@ -329,8 +329,19 @@ class Common:
|
||||
tor_geo_ip_file_path = os.path.join(prefix, "share/tor/geoip")
|
||||
tor_geo_ipv6_file_path = os.path.join(prefix, "share/tor/geoip6")
|
||||
elif self.platform == "Windows":
|
||||
# In Windows, the Tor binaries are in the onionshare package, not the onionshare_cli package
|
||||
base_path = self.get_resource_path("tor")
|
||||
base_path = base_path.replace("onionshare_cli", "onionshare")
|
||||
tor_path = os.path.join(base_path, "Tor", "tor.exe")
|
||||
|
||||
# If tor.exe isn't there, mayber we're running from the source tree
|
||||
if not os.path.exists(tor_path):
|
||||
base_path = os.path.join(os.getcwd(), "onionshare", "resources", "tor")
|
||||
tor_path = os.path.join(base_path, "Tor", "tor.exe")
|
||||
|
||||
if not os.path.exists(tor_path):
|
||||
print("Error: Cannot find tor.exe")
|
||||
|
||||
obfs4proxy_file_path = os.path.join(base_path, "Tor", "obfs4proxy.exe")
|
||||
snowflake_file_path = os.path.join(base_path, "Tor", "snowflake-client.exe")
|
||||
meek_client_file_path = os.path.join(base_path, "Tor", "meek-client.exe")
|
||||
|
Loading…
Reference in New Issue
Block a user