Skip to content

A name rebuilt part by part loses its volume (lexically_normal, weakly_canonical, / with a rooted name) #68

Closed

Description

@Sunrisepeak

Observation

With 0.19.1 (X:/ is a root name, #64), a name that libc++ rebuilds part by part loses its volume:

path("D:/a/./b/../c").lexically_normal()  ->  "/a/c"
path("D:/").lexically_normal()            ->  "/"
path("D:/a") / "/b"                       ->  "/b"

X: is a root name only with the separator after it, so lexically_normal, which rebuilds its result with /=, appends D: as an ordinary name and the root directory / then replaces it under the POSIX append rule. weakly_canonical ends in lexically_normal and loses the volume the same way.

On Windows a program over the hosted arrangement then names its files beneath no volume. mcpp's Windows launcher (mcpplibs.os process::exec, which normalizes the program's name) fails with cannot start Z:/…/okrun.exe under openkal-platform 0.24.1 (mcpp-community/mcpp#889, e2e 988); it starts under 0.24.0.

Expected

The result begins with the volume and its root directory, and appending a name with a root directory and no root name beneath a volume keeps the volume (D:/a / /b is D:/b), as [fs.path.append] states it for a system with root names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions