GNU bug report logs - #57102
29.0.50; Peculiar file-name-split edge case

Previous Next

Package: emacs;

Reported by: Philip Kaludercic <philipk <at> posteo.net>

Date: Wed, 10 Aug 2022 08:26:02 UTC

Severity: normal

Found in version 29.0.50

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: Mattias EngdegÄrd <mattiase <at> acm.org>, Philip Kaludercic <philipk <at> posteo.net>, 57102 <at> debbugs.gnu.org
Subject: bug#57102: 29.0.50; Peculiar file-name-split edge case
Date: Mon, 26 Sep 2022 13:59:22 +0200
Stefan Kangas <stefankangas <at> gmail.com> writes:

> 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"

Uhm...  is that a bug, though?

> 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"))

That seems like a bug.  :-/




This bug report was last modified 2 years and 355 days ago.

Previous Next


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