File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -591,13 +591,10 @@ fn parse_operands(args: &Args) -> io::Result<SplitOps> {
591591
592592/// Validates that the prefix + suffix won't exceed NAME_MAX
593593fn validate_prefix ( prefix : & str , suffix_len : u8 ) -> io:: Result < ( ) > {
594- // Get NAME_MAX for the current directory
595- # [ cfg ( target_os = "macos" ) ]
594+ // POSIX NAME_MAX is typically 255 on most systems (macOS, Linux, BSDs)
595+ // Using a constant avoids platform-specific libc differences
596596 const NAME_MAX : usize = 255 ;
597597
598- #[ cfg( not( target_os = "macos" ) ) ]
599- const NAME_MAX : usize = libc:: NAME_MAX as usize ;
600-
601598 // Maximum filename length is prefix + suffix digits
602599 let max_filename_len = prefix. len ( ) + suffix_len as usize ;
603600
You can’t perform that action at this time.
0 commit comments