Electrux / ls_extended

ls with coloring and icons
BSD 3-Clause "New" or "Revised" License
201 stars 14 forks source link

Filenames with CR's cause alignment problems #29

Closed firebolt55439 closed 5 years ago

firebolt55439 commented 5 years ago

Google Drive (now Google Backup and Sync) creates files named "Icon\r" in each folder that is synced. When displayed via ls, it simply lists "Icon?". However, when using ls_extended, it outputs a "\r", causing rather severe alignment/spacing issues as you might imagine, since the cursor goes to the beginning of the line. I worked around the issue by adding a strncmp check for "Icon\r" files and ignoring them in this line, but that is a stopgap measure at best. You may wish to consider simply stripping CR characters or, as ls does, outputting '?' instead.