Commit a77e846b authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Strip carriage returns from extended descriptions

On Windows, CRs in extended descriptions could result in output of
\r\r\n which could be displayed as 2 newlines (e.g. in notepad.exe).
Since the \n -> \r\n expansion already happens on Windows stdout,
we don't want them in the processed input (file metadata).

As reported by DesotoFireflite (VALHALLA), thank you!
parent b67a5a26
......@@ -393,6 +393,7 @@ function list_file(file, fmt, props)
if(name == 'name')
a.push(FileBase().format_name(p, name_len, options.pad));
else if(name == 'extdesc') {
p = p.replace(/\r/g, '');
a.push(p.replace(/([^\n]+)/g, (extdesc_prefix + "$&")).trimRight());
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment