mirror of
git://sourceware.org/git/lvm2.git
synced 2025-11-03 08:23:48 +03:00
Break down complex one-liner directory check into explicit steps with clear error messages and comments. The original code used a dense subshell expression combining multiple tests with logical operators, making it difficult to understand and maintain. This refactoring separates the logic into: 1. Check directory accessibility (read/write/execute permissions) 2. Check if directory is empty (including hidden files) Each check now has a specific error message, making it easier for users to understand what went wrong. The functionality remains identical, but the code is now more maintainable and debuggable. Changes: - Split accessibility and emptiness checks into separate if statements - Add descriptive comments explaining each validation step - Provide specific error messages for different failure conditions - Maintain original behavior including dotglob/nullglob handling