bug: open_next_directory returns 0 for both empty queue and opendir failure #38
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In
src/client/scanner.c, theopen_next_directory()function returns0for two very different conditions:Lines 58-77:
When
opendir()fails (e.g., permission denied on a subdirectory), the code silently drops the directory from the queue and continues. This means:perror()callSuggested Fix: Return distinct error codes (-1 for errors) and log warnings. Consider collecting and reporting inaccessible directories.
Severity: medium