From 96fd01053fb12eef2f31693b7e7dce9f4a2d0409 Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 23 Jun 2024 00:46:08 +0700 Subject: [PATCH] [py] disable strict time stamps in Firefox profile (#14168) * allow zipping profiles with files and directories stamped earlier than 1980 --------- Co-authored-by: Titus Fortner --- py/selenium/webdriver/firefox/firefox_profile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/selenium/webdriver/firefox/firefox_profile.py b/py/selenium/webdriver/firefox/firefox_profile.py index 14c80b577a9b5..0deb2587a3acc 100644 --- a/py/selenium/webdriver/firefox/firefox_profile.py +++ b/py/selenium/webdriver/firefox/firefox_profile.py @@ -152,7 +152,7 @@ def encoded(self) -> str: if self._desired_preferences: self.update_preferences() fp = BytesIO() - with zipfile.ZipFile(fp, "w", zipfile.ZIP_DEFLATED) as zipped: + with zipfile.ZipFile(fp, "w", zipfile.ZIP_DEFLATED, strict_timestamps=False) as zipped: path_root = len(self.path) + 1 # account for trailing slash for base, _, files in os.walk(self.path): for fyle in files: