diff --git a/edk2toolext/environment/extdeptypes/web_dependency.py b/edk2toolext/environment/extdeptypes/web_dependency.py index ede3625e..97c7a1dd 100644 --- a/edk2toolext/environment/extdeptypes/web_dependency.py +++ b/edk2toolext/environment/extdeptypes/web_dependency.py @@ -11,6 +11,7 @@ import logging import os import pathlib +import platform import shutil import tarfile import tempfile @@ -108,8 +109,9 @@ def unpack(compressed_file_path, destination, internal_path, compression_type): _ref.extract(member=file, path=destination) # unzip functionality does not preserve file permissions. Fix-up the permissions + # if using a non-windows machine. path = pathlib.Path(destination, file) - if path.is_file() and compression_type == "zip": + if path.is_file() and compression_type == "zip" and not platform.system().startswith("Win"): expected_mode = _ref.getinfo(file).external_attr >> 16 path.chmod(expected_mode)