-
Notifications
You must be signed in to change notification settings - Fork 21
Clean up PR #84 #86
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
Clean up PR #84 #86
Changes from all commits
8c73785
72ed407
67c87ac
c23b261
a4161e5
77c3015
56d7cb8
bcb9600
4fc50d8
8288439
4345ee7
c17d5ce
2b2e1c4
f4d0b78
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,6 +43,9 @@ - (instancetype)initWithFileInfo:(unz_file_info64 *)fileInfo filename:(NSString | |
|
|
||
| _compressionMethod = [self readCompressionMethod:fileInfo->compression_method | ||
| flag:fileInfo->flag]; | ||
|
|
||
| uLong permissions = (fileInfo->external_fa >> 16) & 0777U; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you should avoid using such high permissions as 0777. It is recommended to use a maximum of 0755 permissions to prevent malicious code from being corrupted in the zip file.
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're misunderstanding what this line does. It's applying a bit mask to the |
||
| _posixPermissions = permissions ? permissions : 0644U; | ||
| } | ||
| return self; | ||
| } | ||
|
|
||
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.
Why use "short" instead of "UInt32", I think "UInt32" would be better.
Uh oh!
There was an error while loading. Please reload this page.
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.
The permissions NSFileManager returns are of the type
short, orInt16in Swift, as per the documentation.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.
Oh~ you are right.