diff options
author | Jim Meyering <jim@meyering.net> | 2001-06-16 13:22:43 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2001-06-16 13:22:43 +0000 |
commit | 0c8eed4f57db9aa00149c16cabd6d4247ed8a737 (patch) | |
tree | 479dc46f182bff9b29c1fd9d861f5f913193f569 /src | |
parent | dea75949e018dc516346d77c52197b6f42ff8007 (diff) | |
download | coreutils-0c8eed4f57db9aa00149c16cabd6d4247ed8a737.tar.xz |
(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.
Diffstat (limited to 'src')
-rw-r--r-- | src/ls.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -906,8 +906,12 @@ 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 |