Skip to content

Commit

Permalink
[py] fix bug introduced in 9a6df49
Browse files Browse the repository at this point in the history
  • Loading branch information
lmtierney committed Dec 6, 2017
1 parent 66f77a0 commit 6b5fe89
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions py/selenium/webdriver/firefox/firefox_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ def __init__(self, profile_directory=None):
os.chmod(self.profile_dir, 0o755)
self._read_existing_userjs(os.path.join(self.profile_dir, "user.js"))
self.extensionsDir = os.path.join(self.profile_dir, "extensions")
os.chmod(self.extensionsDir, 0o755)
self.userPrefs = os.path.join(self.profile_dir, "user.js")
os.chmod(self.userPrefs, 0o644)
if os.path.isfile(self.userPrefs):
os.chmod(self.userPrefs, 0o644)

# Public Methods
def set_preference(self, key, value):
Expand Down Expand Up @@ -276,11 +276,11 @@ def _install_extension(self, addon, unpack=True):
assert addon_id, 'The addon id could not be found: %s' % addon

# copy the addon to the profile
extensions_path = os.path.join(self.profile_dir, 'extensions')
addon_path = os.path.join(extensions_path, addon_id)
addon_path = os.path.join(self.extensionsDir, addon_id)
if not unpack and not addon_details['unpack'] and xpifile:
if not os.path.exists(extensions_path):
os.makedirs(extensions_path)
if not os.path.exists(self.extensionsDir):
os.makedirs(self.extensionsDir)
os.chmod(self.extensionsDir, 0o755)
shutil.copy(xpifile, addon_path + '.xpi')
else:
if not os.path.exists(addon_path):
Expand Down

0 comments on commit 6b5fe89

Please sign in to comment.