From: Jim Meyering Date: Sat, 16 Jun 2001 13:22:43 +0000 (+0000) Subject: (main): Recheck global print_with_color after calling X-Git-Tag: CPPI-1_9~11 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=0c8eed4f57db9aa00149c16cabd6d4247ed8a737;p=thirdparty%2Fcoreutils.git (main): Recheck global print_with_color after calling parse_ls_color, since that function may have reset it. Based on a patch from Richard Dawe. --- diff --git a/src/ls.c b/src/ls.c index 88fba6c78f..db7864e2cc 100644 --- a/src/ls.c +++ b/src/ls.c @@ -905,9 +905,13 @@ main (int argc, char **argv) i = decode_switches (argc, argv); + if (print_with_color) + parse_ls_color (); + + /* Test print_with_color again, because the call to parse_ls_color + may have just reset it -- e.g., if LS_COLORS is invalid. */ if (print_with_color) { - parse_ls_color (); prep_non_filename_text (); /* Avoid following symbolic links when possible. */ if (color_indicator[C_ORPHAN].string != NULL