Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion py/selenium/webdriver/firefox/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,10 @@ def install_addon(self, path, temporary=False) -> str:

if os.path.isdir(path):
fp = BytesIO()
path_root = len(path) + 1 # account for trailing slash
# filter all trailing slash found in path
path = os.path.normpath(path)
# account for trailing slash that will be added by os.walk()
path_root = len(path) + 1
with zipfile.ZipFile(fp, "w", zipfile.ZIP_DEFLATED) as zipped:
for base, _, files in os.walk(path):
for fyle in files:
Expand Down