Subject: bug#21931: 25.0.50; behaviour of read-directory-name with double slashes

From: Michael Albinus <[email-masked]>
Date: Mon, 23 Nov 2015 21:58:28 +0100

Nicolas Richard <[email-masked]> 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.