Skip to content

Path.parent doesn't work with default Windows path separator #221

@jeffdgr8

Description

@jeffdgr8

Noting your reasoning here:

Windows supports both / and \ as path separators. As mingw brings some GNU goodies to Windows, I decided to stick with /.

If there's a reason to choose \ instead of / (like there are cases when Windows can't correctly handle it), I would definitely change the separator to \.

If you create a Path with a path string that uses Windows' default path separator \ and call path.parent, the current implementation will return null because it doesn't handle the default path separator.

I think users would expect the SystemPathSeparator value to return the default path separator for the platform, being \ for mingw.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions