Skip to content

fix: Handle and warn when counting empty file#45

Closed
100gle wants to merge 2 commits into
mainfrom
fix/count-empty-file
Closed

fix: Handle and warn when counting empty file#45
100gle wants to merge 2 commits into
mainfrom
fix/count-empty-file

Conversation

@100gle
Copy link
Copy Markdown
Owner

@100gle 100gle commented Jul 17, 2025

main

100gle added 2 commits July 17, 2025 23:39
- Remove empty data validation in CountBytes method
- Empty files now return zero statistics instead of errors
- Update tests to reflect new behavior
- Add comprehensive empty data handling tests

Fixes issue where empty files would cause program to crash with
'input data cannot be empty' error during directory scanning.
- Add warning output to stderr when empty files are detected
- Implement path display mode support in FileCounter
- Add getDisplayPath method for flexible path formatting
- Include comprehensive tests for empty file handling
- Warning messages use appropriate path format based on display mode

Empty files now show: 'Warning: Empty file detected: <path>'
@100gle 100gle closed this Jul 17, 2025
@100gle 100gle deleted the fix/count-empty-file branch July 17, 2025 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant