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

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

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


From: Lars Ingebrigtsen
Subject: bug#57102: 29.0.50; Peculiar file-name-split edge case
Date: Fri, 12 Aug 2022 17:35:30 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Philip Kaludercic <philipk@posteo.net> writes:

> I am not sure if this is intentional, but the new `file-name-split'
> is a bit unintuitive in this edge-case:
>
>    (file-name-split "/")        → ("" "" "")
>
> while
>
>    (file-name-split "/a")       → ("" "a")
>    (file-name-split "a/")       → ("a" "")
>    (file-name-split "a/b")      → ("a" "b")

The logic is that

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

is supposed to be always true.  I see that's not the case in the "/"
case, so that needs fixing.






reply via email to

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