Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
sjakobi opened this issue Aug 9, 2018 · 4 comments
Closed
Labels

Comments

@sjakobi
Copy link
Member

sjakobi commented Aug 9, 2018

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.

@sjakobi sjakobi added the bug label Aug 9, 2018
@Martinsos
Copy link
Contributor

I believe this is fixed with #163?

@sjakobi
Copy link
Member Author

sjakobi commented Feb 18, 2021

I believe this is fixed with #163?

I don't see any library changes in #163. Did you mean a different PR?

@Martinsos
Copy link
Contributor

Sorry, my mistake! #167 it is.

@sjakobi
Copy link
Member Author

sjakobi commented Feb 18, 2021

Neat! Thanks a lot for the fix, @Martinsos! :)

@sjakobi sjakobi closed this as completed Feb 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants