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

Change 'expand-home' to support Unix style paths on windows. #73

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nurous
Copy link

@nurous nurous commented Mar 5, 2014

expand-home does not add the home to the path when on windows and the path string uses unix style path separators (which is generally OK in Java). Fix seems to be just ensure the path passed in is converted to a File object first which will convert the unix style separators to File/separator.

@Raynes
Copy link
Owner

Raynes commented Jan 14, 2016

#87 Solves this, right?

@hanshuebner
Copy link

This problem is not solved by #87:

me.raynes.fs> (expand-home "~/test.txt")
#object[java.io.File 0x6bafd5ca "C:\\Users\\test.txt"]
me.raynes.fs> (expand-home "~\\test.txt")
#object[java.io.File 0x5cc7b90a "C:\\Users\\hans\\test.txt"]

As you see, if a forward slash is used as path separator, the path is corrected incorrectly, while it is correctly constructed with a backslash.

@nurous
Copy link
Author

nurous commented Oct 11, 2021

@Raynes Do you want to merge this or should I close it?

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

Successfully merging this pull request may close these issues.

3 participants