Closed iffy closed 2 years ago
Thanks for PR! Looks good. I will confirm Windows locally too and also look into default permissions when composing a new zip / tar programmatically.
Currently, all files extracted from some of my test zips on Windows end up as read only (setPermissions with no fpUserWrite). Zip file permissions also generally appear to be absent or ignored by Windows even if present (only work on Unix). This complicates the behavior needed by Zippy when extracting a .zip from Windows on Mac or Linux for since it will currently appear to have no permissions.
On the tarball front, my Nim-1.4.2.tar.gz which I've used for testing only has {fpGroupWrite, fpGroupRead, fpOthersWrite, fpOthersRead}
on many (all?) files, whcih does not include the fpUserWrite permission. This results in Windows making all the files read only.
On Windows, only the readonly flag is changed, depending on fpUserWrite permission. https://nim-lang.org/docs/os.html#setFilePermissions%2Cstring%2Cset%5BFilePermission%5D
I think https://github.com/guzba/zippy/commit/4d1fb10f7a2ffe00b3c245ac0087c6a4886af3a8 resolves the .zip side.
I think #head now has zip and tar ok on Windows.
Changes released in zippy 0.7.1
Thanks for the quick turnaround!
tar
andunzip
regarding permissions.script.sh
file in it withu+x
permission.