-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
mkdir: fixed not respecting set umask #3150
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
- hardcoded default permissions changed to ones defined by umask
Looks good but could you please add a test? |
@sylvestre I'm having issues writing a test that would modify the
but this has the issue that I can write one that checks if it respects the already set |
- umask application more closely resembles gnu
@pyoky maybe try to do the two operations at the same time? |
I think that's a good solution. On my machine, this seems to give the correct umask:
|
- tests for all permission combinations
Thanks @sylvestre @tertsdiepraam, though in the end I wrote it to call |
This fails:
could you please have a look? thanks |
@sylvestre I changed the |
A few tests are failing, could you please have a look? Thanks |
ping? |
@sylvestre Yup I'm working on it. I'll push a commit in a day or two. |
There is a small linting error. 746 tests are also suddenly failing, due to permission denied errors. Let's see if they're still around once the linting issue is fixed. |
@tertsdiepraam It seems like my use of While testing I also found a slight bug in Lints should also be fixed. Sorry for my mistakes - I'm still new to contributions. |
tests/pwd: escapted directory paths
No worries! Mistakes are basically expected :) Great work on the fix! |
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.
I think this should fix the last clippy error
Co-authored-by: Terts Diepraam <terts.diepraam@gmail.com>
@tertsdiepraam Is there an issue still with checks? I'm seeing the tests are canceled. If there's still issues with merging let me know. |
I'm rerunning those checks. If they pass, I think this can get merged. |
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.
Cool
for i in 0o0..0o027 { | ||
// tests all permission combinations |
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.
These are not all the possible permission settings. That's fine, let's just make sure the comment matches the code.
Resolves #3119.
Removed the permissions mode argument's hardcoded
default_value()
of755
, instead usinguutils::mode::get_umask()
when argument isn't specified.Before:
After:
This mirrors the behavior of GNU
mkdir
.