Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set permissions on package dirs #134

Merged
merged 1 commit into from
Oct 31, 2024
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
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