refactor: clean up imports in test_install.rs
Removed duplicate `use std::path::Path;` import and unified `#[cfg(not(windows))]` to `#[cfg(unix)]` for `use uucore::libc;` to improve code consistency and target Unix-like systems more precisely.
d28c545
25 days ago
by mattsu2020
0%
Update .vscode/cspell.dictionaries/jargon.wordlist.txt
delete duplicate word
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
9d4e06f
24 days ago
by mattsu2020
0%
Merge branch 'install-only-updates' of https://github.com/mattsu2020/coreutils into install-only-updates
94664e1
24 days ago
by mattsu2020
-0.01%
test: fix deep path test in install utility
Update the deep path generation in the install test to use libc::PATH_MAX, ensuring the test accurately checks behavior at the system's maximum path length limit.
482a667
24 days ago
by mattsu2020
+0.02%
fix: remove redundant parentheses in deep path test
aa93786
24 days ago
by mattsu2020
0%
test: refine deep path generation in install test
Refactor the path construction logic in test_install_directory_deep_path_succeeds to ensure the generated path is at least 3000 characters long while respecting PATH_MAX limits, preventing potential overflows and improving test reliability for long path scenarios.
0a6530b
24 days ago
by mattsu2020
-0.01%
refactor: consolidate min_repeat calculation in test_install.rs
Combine the min_repeat calculation into a single line for improved readability in the test_install_directory_deep_path_succeeds function.
6d436ab
24 days ago
by mattsu2020
+0.02%
style(tests): format min_repeat calculation in test_install
Simplify the min_repeat assignment by consolidating it into a single line, improving code readability and consistency in the install utility tests.
f89854d
24 days ago
by mattsu2020
-0.02%
refactor(tests): adjust imports and simplify expression in install test
- Update import conditions: OsStrExt for unix, OsStringExt for linux to improve platform compatibility
- Chain method calls in min_repeat calculation for code conciseness and readability
ed74e1e
24 days ago
by mattsu2020
+0.03%
refactor: replace panic with assert in install directory test
Replaces a panic with an assert in the `test_install_directory_deep_path_succeeds` function to handle cases where the temporary directory path exceeds PATH_MAX, improving test reliability and error reporting consistency.
e62a629
24 days ago
by mattsu2020
+2.71%
style(install): reformat code and reorder imports in mode.rs
Reordered the import statement for nix::fcntl to place OFlag before open and openat. Reformatted long lines, including expressions for base_fd, error creation, and openat calls, to improve readability and adhere to code style guidelines.
1a1c8ed
24 days ago
by mattsu2020
-2.73%
refactor: simplify chmod_long_path for better path handling
- Removed platform-specific node_open_flags functions to reduce code duplication
- Introduced last_component tracking to properly handle the final path component
- Updated CurDir and ParentDir handling to set last_component when it's the last element
- Simplified Normal component logic to only open directories for non-final components
- Use last_component for fchmod operation, defaulting to "." if no component is found, improving reliability for edge cases in long path chmod operations
312a293
24 days ago
by mattsu2020
-0.02%
feat(install): add AsFd import for unix file descriptor access
Added std::os::fd::AsFd import under unix-specific conditions to enable file descriptor-based operations in the install utility's mode handling.
d20acf1
24 days ago
by mattsu2020
0%
feat: add AsRawFd import for raw file descriptor access
Added AsRawFd trait import alongside AsFd in mode.rs to enable access to raw file descriptors, supporting enhanced file handling operations in the install utility.
482fd2b
24 days ago
by mattsu2020
+0.02%
refactor(install): remove unused std::fs import and reorder path import
Removed the unused `std::fs` import and repositioned `std::path::Path` after the conditional block for better import organization in the mode module.
b32244b
24 days ago
by mattsu2020
0%
docs: add technical terms to cspell jargon wordlist
Added dirfd, ENAMETOOLONG, and fchmodat to the VS Code cspell dictionary to prevent false positives during spell checking of technical code terms.
807b56b
24 days ago
by mattsu2020
0%
test: add safety margin for small PATH_MAX in deep path test
Adjust path calculation in test_install_directory_deep_path_succeeds to subtract a safety margin when PATH_MAX is 1024 or less, preventing potential buffer overflow issues in long path scenarios.
f112e21
24 days ago
by mattsu2020
+0.04%
Merge branch 'main' of https://github.com/uutils/coreutils into install-only-updates
18e71e9
7 days ago
by mattsu2020
-0.04%
Revert "Improve fold bench data generation"
This reverts commit 483a1f2fe9a5d0ccebd025a53d7b7ba4f353f860.