bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#22477: 24.5; Dired does not work if file names contain newlines


From: Aura Kelloniemi
Subject: bug#22477: 24.5; Dired does not work if file names contain newlines
Date: Wed, 27 Jan 2016 21:30:58 +0200
User-agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-unknown-linux-gnu)

Glenn Morris <rgm@gnu.org> writes:

 > Aura Kelloniemi wrote:

 > > 1. Create a file which contains a newline character in its name.

 > If you like to do weird things like that, adding "-b" to
 > dired-listing-switches helps.

Oh no, I don't like to do such weird things. My point is not to nitpick or
irritate you. I'm just interested about completeness: if Unix supports file
names with control characters (which arguably is a questionable feature), then
Dired (being the best file manager on the planet) should IMHO be able to deal
with them, or at least document the incompatibility clearly.

Also I wonder if a cracker can confuse Dired by creating a file name like this
"Hello World.txt\ndrwx-r--r--  1 user users ..."

-b probably is not portable, because it's not Dired's default. But Dired could
 test for -b just like it tests for --dired. WDired should also support these
 escapes.

I tried to edit with WDired a symbolic link which points to a file containing
 the string "->" which is a real file on my system. (In music files I use ->
 to separate the performer and composition names.) This did not work either.
 WDired failed with error "wdired-get-filename: Wrong type argument:
 integer-or-marker-p, nil".
 
I noticed too, that the -F switch to ls makes Dired fail the same way as file
names with embedded newlines. It was hard to google for this issue, others
have certainly faced it too. But (again IMHO) -F shouldn't break Dired, or at
least there should be another way to have Dired put a slash at the end of
directory names.

I wish you could do something to these issues. If you can't extend Dired's and
WDired's escaping support, you could at least document the issues.

Anyway, thank you for reading my complaints.

-- 
Aura





reply via email to

[Prev in Thread] Current Thread [Next in Thread]