summaryrefslogtreecommitdiffstats
path: root/src/color.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-10-31 12:24:01 -0400
committerGitHub <noreply@github.com>2024-10-31 12:24:01 -0400
commite831a394426e19c39f94d9e8802aead7f25ba00d (patch)
tree04e9063206c54d9cad005903a5efbfe279a6826f /src/color.c
parent515cda3e3763484af448ad1bc599d583eeeadb18 (diff)
parent7152645618fc22766f5c954d12e9489866633e26 (diff)
downloadbfs-e831a394426e19c39f94d9e8802aead7f25ba00d.tar.xz
Merge pull request #146 from jody-frankowski/fix/capa-color-non-linux
Fix bfs coloring all files as if they had a capability, on non-Linux systems
Diffstat (limited to 'src/color.c')
-rw-r--r--src/color.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/color.c b/src/color.c
index 036dda5..e7f0973 100644
--- a/src/color.c
+++ b/src/color.c
@@ -939,7 +939,7 @@ static const struct bfs_stat *cpath_stat(const struct cpath *cpath) {
/** Check if a path has non-trivial capabilities. */
static bool cpath_has_capabilities(const struct cpath *cpath) {
if (cpath->valid == cpath->len) {
- return bfs_check_capabilities(cpath->ftwbuf);
+ return bfs_check_capabilities(cpath->ftwbuf) > 0;
} else {
// TODO: implement capability checks for arbitrary paths
return false;