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

extractAllTo() no longer preserves linux file permissions #530

Open
ocmstone opened this issue Aug 12, 2024 · 2 comments
Open

extractAllTo() no longer preserves linux file permissions #530

ocmstone opened this issue Aug 12, 2024 · 2 comments

Comments

@ocmstone
Copy link

ocmstone commented Aug 12, 2024

In version 0.5.15, the following function call: zip.extractAllTo(unzipFileLocation, true, true)

Is supposed to keepOriginalPermission when the third argument is true. Up to version 0.5.14 this worked correctly, preserving Linux rwx permissions. But as of 0.5.15, it is as if there is a umask of 0o117 when unpacking. It also adds write permission for group.

A file in the zip archive was saved with these permissions:
-rwxr-x--- 1 user staff 9744 Aug 12 2024 opscompass.sh*

But unzipped as:
-rw-rw---- 1 user staff 9744 Aug 12 2024 opscompass.sh*

VERIFIED: 0.5.14 still works correctly

@NickAllmakerOpsCompass
Copy link
Contributor

I'm not 100% sure but it looks like the issue was introduced by the change to number parsing in #518. Specifically, I think that when fileAttr switched from just doing bitwise arithmetic to the uint16 helper, that caused it to start turning fileAttr into 0.

chadlwilson added a commit to chadlwilson/gauge that referenced this issue Aug 14, 2024
Locks package at 0.5.14 since 0.5.15 seemed to introduce
the problem at cthackers/adm-zip#530

Signed-off-by: Chad Wilson <[email protected]>
chadlwilson added a commit to chadlwilson/gauge that referenced this issue Aug 14, 2024
Locks package at 0.5.14 since 0.5.15 seemed to introduce
the problem at cthackers/adm-zip#530

Signed-off-by: Chad Wilson <[email protected]>
zabil pushed a commit to getgauge/gauge that referenced this issue Aug 14, 2024
* Fix golint warnings

Signed-off-by: Chad Wilson <[email protected]>

* Fix cli npm package installs on Linux/MacOS

Locks package at 0.5.14 since 0.5.15 seemed to introduce
the problem at cthackers/adm-zip#530

Signed-off-by: Chad Wilson <[email protected]>

---------

Signed-off-by: Chad Wilson <[email protected]>
@chadlwilson
Copy link

This was fixed by #531 - @cthackers would you be able to cut a 0.5.16 release to fix this regression? 🙏

will-v-pi added a commit to raspberrypi/pico-vscode that referenced this issue Aug 23, 2024
0.5.15 doesn't respect linux file permissions (cthackers/adm-zip#530)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants