From d9b3196d6c8f4fa0e7d0a4771040762edaebb1ee Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 23 May 2019 17:11:23 -0400 Subject: 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. --- color.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'color.c') diff --git a/color.c b/color.c index fd9949e..aefc3ff 100644 --- a/color.c +++ b/color.c @@ -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; -- cgit v1.2.3