diff options
-rw-r--r-- | coreutils/ls.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/coreutils/ls.c b/coreutils/ls.c index bbc9114d2..661f9a286 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c @@ -716,6 +716,7 @@ static int list_single(struct dnode *dn) #endif case LIST_FILENAME: #ifdef CONFIG_FEATURE_LS_COLOR + errno = 0; if (show_color && !lstat(dn->fullname, &info)) { printf( "\033[%d;%dm", bgcolor(info.st_mode), fgcolor(info.st_mode) ); @@ -741,6 +742,7 @@ static int list_single(struct dnode *dn) #endif #ifdef CONFIG_FEATURE_LS_COLOR if (show_color) { + errno = 0; printf( "\033[%d;%dm", bgcolor(info.st_mode), fgcolor(info.st_mode) ); } |