1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-11-03 08:23:48 +03:00
Files
lvm2/scripts
Zdenek Kabelac e30289c855 scripts: refactor lvmdump directory validation
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
2025-07-23 14:51:57 +02:00
..
2021-03-19 23:21:18 +01:00
2024-08-30 16:51:15 +02:00
2024-08-30 16:51:15 +02:00
2025-06-27 10:26:00 +02:00
2025-06-27 10:26:00 +02:00
2016-01-21 12:11:37 +01:00
2021-04-23 23:00:55 +02:00
2010-11-05 16:18:38 +00:00