-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Enhance mode parsing to support comma-separated mode strings in install command #9298
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
Enhance mode parsing to support comma-separated mode strings in install command #9298
Conversation
…e` function. Add tests for comma-separated mode handling in file and directory creation.
|
|
||
| /// Takes a user-supplied string and tries to parse to u16 mode bitmask. | ||
| /// Supports comma-separated mode strings like "ug+rwX,o+rX" (same as chmod). | ||
| pub fn parse(mode_string: &str, considering_dir: bool, umask: u32) -> Result<u32, String> { |
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.
maybe write a unit test for this function :)
…g numeric, symbolic, and mixed modes, as well as handling of invalid inputs and umask considerations.
|
is this error relevant to my changes? |
No space left on device? |
CodSpeed Performance ReportMerging #9298 will improve performances by 8.57%Comparing Summary
Benchmarks breakdown
Footnotes
|
|
GNU testsuite comparison: |
|
thanks! It seems that mknod, mkfifo, and mkdir also supports this. I am not sure we support that if you want to have a look :) |
|
Sure |
Identified here: <uutils/coreutils#9298> * tests/install/basic-1.sh: Add the check.
…ll command (uutils#9298) * Enhance mode parsing to support comma-separated mode strings in `parse` function. Add tests for comma-separated mode handling in file and directory creation. * Add comprehensive tests for mode parsing in `parse` function, covering numeric, symbolic, and mixed modes, as well as handling of invalid inputs and umask considerations. --------- Co-authored-by: Sylvestre Ledru <[email protected]>
…ll command (uutils#9298) * Enhance mode parsing to support comma-separated mode strings in `parse` function. Add tests for comma-separated mode handling in file and directory creation. * Add comprehensive tests for mode parsing in `parse` function, covering numeric, symbolic, and mixed modes, as well as handling of invalid inputs and umask considerations. --------- Co-authored-by: Sylvestre Ledru <[email protected]>
Fixes #9250