NC incorrectly displaying filenames with line breaks \n (\x0a) in them

Questions, glitches, bugs and crashes
Locked
JayB
Posts: 192
Joined: Sun Jan 08, 2017 4:38 pm

NC incorrectly displaying filenames with line breaks \n (\x0a) in them

Post by JayB » Tue Mar 28, 2017 10:55 pm

Some filenames have a line break \n in them. Finder has a way to (GUI-wise) show them as several "half-lines", i.e. for example the lower half of the first line, and the upper half of the second line, which looks really weird in the GUI.

Nimble Commander just shows the first line, and only the part of the filename before the \n. In the Attributes window NC actually shows the full filename, including line breaks. So in the normal directory listing in the panels, we would need some way to represent the linebreak without messing up the GUI as in Finder. (In the shell the line-break is represented by a question mark "?", so that might be an option; or better yet: "\x0a".)

Case in point, a file seemingly called "." in my $HOME/Library, but it's actually ".\n{USER}\n" or , ".\x0a{USER}\x0a", with {USER} being my id -un.

Image

User avatar
mike
Posts: 1060
Joined: Thu Jul 16, 2015 5:35 am
Location: Exeter, UK

Re: NC incorrectly displaying filenames with line breaks \n (\x0a) in them

Post by mike » Fri Apr 07, 2017 2:17 am

Looks like a bug, will fix.

JayB
Posts: 192
Joined: Sun Jan 08, 2017 4:38 pm

Re: NC incorrectly displaying filenames with line breaks \n (\x0a) in them

Post by JayB » Thu May 04, 2017 10:32 am

Addendum: just found out that when folders have a custom icon, the icon data is placed in a resource fork, but not connected to the directory itself, but to an invisible file named "Icon". That file has a carriage return \r at the end, and it's also shown as "Icon?" by ls in the shell. In the NC window it displays fine, without GUI glitches, but the user has no idea that there is a carriage return at the end. Menu item "File Attributes" (as before) shows the correct filename.

Locked