Skip to content

Commit

Permalink
Return early in torbrowser_12_rename_old_tbb() if the TBB path does n…
Browse files Browse the repository at this point in the history
…ot exist yet
  • Loading branch information
micahflee committed Dec 14, 2022
1 parent 52f7be3 commit 7472ff6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions torbrowser_launcher/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ def build_paths(self, tbb_version=None):

# Tor Browser 12.0 no longer has locales. If an old TBB folder exists with locals, rename it to just tor_browser
def torbrowser12_rename_old_tbb(self):
if not os.path.exists(self.paths["tbb"]["dir"]):
return
for filename in os.listdir(self.paths["tbb"]["dir"]):
abs_filename = os.path.join(self.paths["tbb"]["dir"], filename)
if filename.startswith("tor-browser_") and os.path.isdir(abs_filename):
Expand Down

0 comments on commit 7472ff6

Please sign in to comment.