Skip to content

[C++] FilesystemFromUriOrPath and FileSystemFromUri should always remove trailing slash #35399

@westonpace

Description

@westonpace

Describe the enhancement requested

This is a fairly minor change but it is something I encountered trying to simplify the implementation of these methods in #34420. Currently, these methods may or may not remove the trailing slash from a path. For example:

FileSystemFromUriOrPath("s3://foo/bar/", &out_path);
FileSystemFromUriOrPath("file:///foo/bar/", &out_path);

The former returns foo/bar and the latter returns /foo/bar/. I think the change leading slash being different between the two is ok. However, I think there is no reason to remove the trailing slash in one instance and not the other.

No work needs to be done here, I'm addressing this already in #34420 . However, I wanted to open a new issue to ensure visibility in case someone was relying on the old behavior or knew of a reason that the old behavior existed.

Component(s)

C++

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions