diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2019-05-23 17:11:23 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2019-05-24 09:00:50 -0400 |
commit | d9b3196d6c8f4fa0e7d0a4771040762edaebb1ee (patch) | |
tree | f378d6955cf3cd6817a47e3a95284441552b221e /color.c | |
parent | 28bbaeac8058653a4a46ae439c37d251a550f4f9 (diff) | |
download | bfs-d9b3196d6c8f4fa0e7d0a4771040762edaebb1ee.tar.xz |
fsade: Refactor the POSIX.1e abstractions
Since we're going to want to abstract more things that aren't part of
POSIX.1e (like xattrs) in a similar way, let's give this a more generic
name. And while we're at it, give it some more precise error reporting,
and add some tests.
Diffstat (limited to 'color.c')
-rw-r--r-- | color.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -17,7 +17,7 @@ #include "color.h" #include "bftw.h" #include "dstring.h" -#include "posix1e.h" +#include "fsade.h" #include "stat.h" #include "trie.h" #include "util.h" @@ -572,7 +572,7 @@ static const char *file_color(const struct colors *colors, const char *filename, color = colors->setuid; } else if (colors->setgid && (statbuf->mode & 02000)) { color = colors->setgid; - } else if (colors->capable && bfs_check_capabilities(ftwbuf)) { + } else if (colors->capable && bfs_check_capabilities(ftwbuf) > 0) { color = colors->capable; } else if (colors->executable && (statbuf->mode & 00111)) { color = colors->executable; |