diff options
author | Pádraig Brady <P@draigBrady.com> | 2009-09-22 10:06:49 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2009-09-22 10:07:21 +0100 |
commit | 8c92bb3441c628fe87ccf4a946b1c8b14cb0a0d2 (patch) | |
tree | 3f4e57cdfa197056358463745050ee7d8c8e2d4a /src | |
parent | 32f987af1274d3ed53244564ab537dce8e330e0a (diff) | |
download | coreutils-8c92bb3441c628fe87ccf4a946b1c8b14cb0a0d2.tar.xz |
ls: fix a performance regression
* src/ls.c (print_color_indicator): This reinstates commit f3f1ccfd,
21-10-2008, "ls: make it possible to disable file capabilities checking"
which was inadvertently reverted with commit 3a169f4c, 14-09-2009,
"ls: handle disabling of colors consistently ...".
Diffstat (limited to 'src')
-rw-r--r-- | src/ls.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -4126,7 +4126,8 @@ print_color_indicator (const char *name, mode_t mode, int linkok, type = C_SETUID; else if ((mode & S_ISGID) != 0 && is_colored (C_SETGID)) type = C_SETGID; - else if (has_capability (name) && is_colored (C_CAP)) + /* has_capability() called second for performance. */ + else if (is_colored (C_CAP) && has_capability (name)) type = C_CAP; else if ((mode & S_IXUGO) != 0 && is_colored (C_EXEC)) type = C_EXEC; |