--- src/ls.c.orig 2017-09-01 00:11:03.000000000 -0700 +++ src/ls.c 2017-12-23 22:53:57.448594507 -0800 @@ -2138,12 +2138,19 @@ filename_quoting_options = clone_quoting_options (NULL); if (qs == escape_quoting_style) set_char_quoting (filename_quoting_options, ' ', 1); - if (file_type <= indicator_style) - { - char const *p; - for (p = &"*=>@|"[indicator_style - file_type]; *p; p++) - set_char_quoting (filename_quoting_options, *p, 1); - } + + + /* This code was causing bugs in ls -FQ. There were no comments, so + it's unclear exactly what it was trying to accomplish. + For now, we'll skip it for C quoting-style. (-Q). */ + if (qs != c_quoting_style) { + if (file_type <= indicator_style) + { + char const *p; + for (p = &"*=>@|"[indicator_style - file_type]; *p; p++) + set_char_quoting (filename_quoting_options, *p, 1); + } + } dirname_quoting_options = clone_quoting_options (NULL); set_char_quoting (dirname_quoting_options, ':', 1);