GNU bug report logs - #21931
25.0.50; behaviour of read-directory-name with double slashes

Previous Next

Package: emacs;

Reported by: Nicolas Richard <youngfrog <at> members.fsf.org>

Date: Mon, 16 Nov 2015 06:29:01 UTC

Severity: normal

Found in version 25.0.50

Done: Nicolas Richard <youngfrog <at> members.fsf.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Michael Albinus <michael.albinus <at> gmx.de>
To: 21931 <at> debbugs.gnu.org
Cc: youngfrog <at> members.fsf.org
Subject: bug#21931: 25.0.50; behaviour of read-directory-name with double slashes
Date: Mon, 23 Nov 2015 21:58:28 +0100
Nicolas Richard <youngfrog <at> members.fsf.org> writes:

>> What list were you expecting to see? "//" has always meant "start at root" to
>> mean, ignoring whatever comes prior. This is how C-x C-f works, and it means
>> you don't have to delete any existing default text in order to begin at root.
>
> Indeed, but when constructing a path via (concat foo "/" bar), it can
> happen that the result contains //. If this is then used as arg to
> read-directory-name, this leads to an unexpected default.

(expand-file-name bar foo) is your choice. If you dislike it, take
(concat (directory-file-name foo) "/" bar)

> Thanks for looking into it, I close it.
>
> Nico.

Best regards, Michael.




This bug report was last modified 9 years and 182 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.