-
Notifications
You must be signed in to change notification settings - Fork 21
Support archival and restoration of POSIX permissions #84
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Martin, I'd first like to thank you for contributing this PR! It's a really awesome idea for the framework, and I'm glad you worked out all the details for how best to implement it. You even submitted the request to the right branch! There are some changes I'd like to see before we merge, though. I made some comments inline for context, but I've created tasks in this comment for the bigger-picture changes.
- I'd like to leave permissions to only be specified in the most detailed overload. All the other overloads can pass 0. This way we don't break any existing code. So in the header, there should only be two changes (a new declaration for
writeDataand one forwriteIntoBuffer, which add thepermissionsparameter) - Please revert your changes to the project and scheme (as I think they're what's breaking the build)
- Make sure the Travis CI build is passing (it makes sure all the code compiles, and tests pass)
- Thanks for adding test code in your PR description, but would you be able to add some unit test cases? It would be great if you could add a
PermissionsTestsclass (preferably in Swift), with methods to test the cases below. There are tons of examples for how I'm testing this framework in the other test cases, and I'll be glad to help with any questions you have.- Using each of the overloads that doesn't specify permissions creates files on disk with default permissions like what currently happens (preserve backwards-compatibility)
- Creating a new archive with specific non-default permissions and then reading it in (same file, different
UZKArchiveinstance) returns the expected values in theUZKFileInfoinstances - Extracting an archive with non-default permissions results in those permissions in the extracted files
|
First of all, I am sorry that I have not made the correct modifications in the submitted code, I will improve these errors in the future. |
|
Hey Martin, no big deal, this is part of the process for a pull request. Let's work on this together. The PR isn't final - you can push more changes to your branch, and it'll update. |
|
@abbeycode There is currently a change in the package, I seem to be destroying the version of Xcode, it has been upgraded to Xcode 10.2 |
|
Please let me know when you're done with your changes and are ready for me to review again. Also, make sure you review your changes in the "Files changed" tab when you're done, so they only contain changes you intended to make (not making whitespace changes to code you otherwise didn't touch). Also, if you're having trouble understanding any of my comments, please let me know, and I can try to rephrase, or go into more detail. |
|
I just saw your Xcode 10.2 comment. The version of Xcode you use shouldn't matter, so long as you don't commit any upgrade checks or use APIs only available in newer versions of the frameworks (which Xcode shouldn't let you do unless you change the deployment target, which you shouldn't change either :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please let me know when you're done with your changes and are ready for me to review again. Also, make sure you review your changes in the "Files changed" tab when you're done, so they only contain changes you intended to make (not making whitespace changes to code you otherwise didn't touch).
Also, if you're having trouble understanding any of my comments, please let me know, and I can try to rephrase, or go into more detail.
<0031d57>
I have already submitted a new code and still need your check. I will continue if I need to modify it.
How can I conduct a new review?
|
Did you see the list of requests I made in the initial review comment? |
Yes, I see this problem now, because I have an exception in the code version of the workbench that I can't resubmit, I need to close the Pull Request later, until I rearrange and create a new Pull Request. What do you think? |
|
You don't need to close this PR, and you don't need to use a different version of Xcode. Just back out the changes you made to the |
2. Remove the permission to set the default 0644U, now the default is 0755U 3. Fix the damage caused by Xcode 4. Add to Test Code and Test File 5. Add the writeFile function
@abbeycode Since Xcode breaks git, it is not considered to turn off PR before. Now I have resubmitted and passed the Travis CI build, I will continue to modify if there are new issues. |
abbeycode
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for sticking with this process, Martin. It's starting to shape up! It seems like there's a lot of criticism in this review, but there are only a few bigger things. Most of my comments are minor nitpicks.
|
I've created a new branch, |
2. Remove the permission to set the default 0644U, now the default is 0755U 3. Fix the damage caused by Xcode 4. Add to Test Code and Test File 5. Add the writeFile function
I have rebase to "PR84", but there are some merge errors, I think I need to modify it in my free time, I will add some new code to optimize the "UZKFileInfo - isDirectory" implementation, then I will commit again. |
|
What are you changing in the Also, the changes I'm asking you to rebase into your branch are super simple: just a single commit affecting two lines (link here). Just resolve the rebase conflict using your version of |
2. Add the UZKFileInfo property (isSymLink, isResourceFork) 3. UZKFileInfo isDirectory attribute value takes a new judgment function 4. Rebase branch to "PR84"
|
I have rebased to "PR84" and modified the previous error. |
|
The new commit seems to have changed something in Xcode, and I have avoided submitting Xcode files as much as possible. This makes me very annoyed, I need your help to get it back to the original version. |
|
Martin, I would like to merge this PR into the I'm going to squash and merge your PR and will start making my own commits on top. I'll open up a new PR and we can continue the discussion there. |
… getting the build to succeed
|
PR #87 was merged into the v1.9 branch, including these changes |
Submit log
Test Code