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

expand-home is wrong on windows when passed a string with a forward slash #68

Closed
jjttjj opened this issue Aug 8, 2022 · 0 comments
Closed

Comments

@jjttjj
Copy link
Contributor

jjttjj commented Aug 8, 2022

(fs/expand-home "~/my-file") ;; "C:\\Users\\my-file" incorrect, missing username directory when using forward slash in the argument
(fs/expand-home "~\\my-file") ;; "C:\\Users\\justin\\my-file" correct
(fs/expand-home (fs/path "~/my-file")) ;; "C:\\Users\\justin\\my-file" correct

This is because the current expand-home implementation just looks for the index of the path separator in the input. Calling as-path on the input within expand-home should fix this.

I will provide a PR for this today or tomorrow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant