Skip to content

Make os::make_absolute logic available for arbitrary Paths #5003

Closed
@mitsuhiko

Description

@mitsuhiko

Especially in web applications (or other apps that do not use the current working directory of the operating system) it would be useful to be able to use make_absolute against an arbitrary path. In Python that's provided by os.path.join. Unfortunately that also comes with negative security aspects (if the right hand side is absolute).

I would propose a Path::unsafe_join function that works like the Python one. As an extension it would also make sense to further improve how joining works for Windows.

Example implementation: https://gist.github.com/mitsuhiko/4974499

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions