Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bfs coloring all files as if they had a capability, on non-Linux systems #146

Merged

Commits on Oct 31, 2024

  1. color: Handle bfs_check_capabilities error code (-1) in cpath_has_cap…

    …abilities
    
    On non-Linux systems, bfs_check_capabilities always returned -1, so
    cpath_has_capabilities would always return true. If bfs was called with
    an LS_COLORS containing the `ca` statement, e.g. `ca=30;41`, bfs would
    color ALL the files.  While including the `ca` statement in LS_COLORS
    on non-Linux systems is unusual, this is not an error and is a valid
    use-case (e.g. Using GNU ls or lsd).
    
    Fixes: 1520d4d ("color: Don't color files like directories on ENOTDIR")
    jody-frankowski authored and tavianator committed Oct 31, 2024
    Configuration menu
    Copy the full SHA
    7152645 View commit details
    Browse the repository at this point in the history