Skip to content

Parsing of current directory path (".") is still platform-dependent #129

@sjakobi

Description

@sjakobi

Here's a demonstration on Linux:

λ Path x = [Path.Posix.reldir|.|]
λ x
""
λ Path x = [Path.Windows.reldir|.|]
λ x
".\\"

The root cause of the problem is that our definition of relRootFP uses the platform-dependent System.FilePath.pathSeparator:

-- | Normalized file path representation for the relative path root
relRootFP :: FilePath
relRootFP = '.' : [FilePath.pathSeparator]

A fix should probably move relRootFP into Path.Include.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions