Skip to content

Commit

Permalink
fix: set permissions on package dirs
Browse files Browse the repository at this point in the history
Defaulted to 0 previously, which caused problems trying to unpack, inspect and modify built packages.
  • Loading branch information
MHajoha committed Oct 31, 2024
1 parent 3f8a855 commit 52fe2f7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions questionpy_sdk/package/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,9 @@ def _ensure_directory_entries(self, path: Path) -> None:
zipinfo = zipfile.ZipInfo(strpath, date_time=datetime.datetime.now(tz).timetuple()[:6])
zipinfo.compress_type = self.COMPRESS_TYPE
zipinfo.CRC = 0 # TODO: remove once bug is resolved (https://github.com/python/cpython/issues/119052)
# There is a great summary of the external attributes field here: https://unix.stackexchange.com/a/14727
zipinfo.external_attr = 0o40755 << 16 # Unix mode drwxr-xr-x
zipinfo.external_attr |= 0b10000 # DOS directory attribute
self._zipfile.mkdir(zipinfo)

def __exit__(
Expand Down

0 comments on commit 52fe2f7

Please sign in to comment.