guzba / zippy

Pure Nim implementation of deflate, zlib, gzip and zip.
MIT License
246 stars 29 forks source link

Wrong file permissions when extracting tarball #36

Closed SnwMds closed 2 years ago

SnwMds commented 2 years ago

Extracting with tar:

$ tar --extract --file=./pcre-8.45.tar.gz
$ stat -c%a ./pcre-8.45/configure
755

Extracting with zippy:

import pkg/zippy/tarballs

extractAll(tarPath = "./pcre-8.45.tar.gz", dest = "./pcre")

Result:

$ stat -c%a ./pcre/pcre-8.45/configure
75

Tarball: https://megalink.dl.sourceforge.net/project/pcre/pcre/8.45/pcre-8.45.tar.gz

guzba commented 2 years ago

Hello, sorry to say but this is not a priority for me to fix at this point. Supporting file permissions was added here by a contributor https://github.com/guzba/zippy/commit/9a5aa900357cf1dc9f400e79da509ca6c2c7a90a

Thanks for the report though. Keeping this here for future work.

PR + test case would be welcome if you find the issue.

guzba commented 2 years ago

Thanks again for reporting this. I believe the new implementation of zippy/tarballs extractAll should be handling file permissions better in zippy >= 0.9.3.

Please re-open this if you continue to see an issue and we'll give it another look.