Subject: Re: bug#57102: 29.0.50; Peculiar file-name-split edge case

From: Stefan Kangas <[email-masked]>
Date: Mon, 26 Sep 2022 07:14:56 -0400

Lars Ingebrigtsen <[email-masked]> writes:

> Stefan Kangas <[email-masked]> writes:
>
>> I also note that we have `string-split' and `string-join', but
>> `file-name-split' and `file-name-concat'.  I think `file-name-join'
>> would be a better name.
>
> I think that makes sense...
>
>> We should leave behind an alias if we rename it of course, perhaps
>> forever.
>
> An obsolete alias?

Sure.

But, thinking more about this, maybe we would want a new function.
Because this is not fun:

    (apply #'file-name-concat (file-name-split "/foo/bar"))
    => "foo/bar"

I'd like it better if it worked like this:

    (file-name-join (file-name-split "/foo/bar"))
    => "/foo/bar"

And then there are the issues Mattias has pointed out.  One small step
in the right direction would be to make sure that:

    (equal (file-name-split "/foo")
           (file-name-split "//foo"))