From f4d0474d9871fad51756f73f85693c9e876f3366 Mon Sep 17 00:00:00 2001 From: Andrew Murray <3112309+radarhere@users.noreply.github.com> Date: Wed, 18 Dec 2024 08:54:56 +1100 Subject: [PATCH] Use greater than or equal for version check Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> --- winbuild/build_prepare.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/winbuild/build_prepare.py b/winbuild/build_prepare.py index 68abf4ef37d..74859f0cefd 100644 --- a/winbuild/build_prepare.py +++ b/winbuild/build_prepare.py @@ -521,10 +521,10 @@ def extract_dep(url: str, filename: str, prefs: dict[str, str]) -> None: if sources_dir_abs != member_prefix: msg = "Attempted Path Traversal in Tar File" raise RuntimeError(msg) - if sys.version_info <= (3, 11): - tgz.extractall(sources_dir) - else: + if sys.version_info >= (3, 12): tgz.extractall(sources_dir, filter="data") + else: + tgz.extractall(sources_dir) else: msg = "Unknown archive type: " + filename raise RuntimeError(msg)