-
Notifications
You must be signed in to change notification settings - Fork 202
fix: parse file_mode as 8 based value #163
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
base: master
Are you sure you want to change the base?
Conversation
} | ||
// v == MinInt | ||
return 0 | ||
} |
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.
Hmm... |
This pull request is stale because it has been open 60 days with no activity. |
Per my comment in #66 this is still not working |
internal/provider/file_mode.go
Outdated
return 0, fmt.Errorf("file_mode must be greater equal than 0: %d", a) | ||
} | ||
if a > 0o777 { | ||
return 0, fmt.Errorf("file_mode must be less equal than 0o777: %d", a) |
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.
Limiting it to 0o777
means limits the mode to just [ugo][rwx]
-- it should also be possible to set the setuid, setgid, and sticky bits. To allow these, use 0o4777
as the maximum value.
Also, does ParseInt(s, 8, 32)
handle the situation when the string is leads with 0
and 0o
?
Do we also want to keep the current behavior of assuming the string is a decimal value, unless the string leads with a 0
or 0o
? If not, we should make it very clear in the changelog (etc.) that the workaround will no longer work.
@suzuki-shunsuke how about we skip the suppress function and make it a Breaking Change for |
I'll fix the conflict.
I'll consider. |
Ok I'll remove it from the next milestone and we will put it accordingly to the changes to another |
ba47f0a
to
42c1f63
Compare
9d1b240
to
2cd798c
Compare
This pull request is stale because it has been open 60 days with no activity. |
Close #66