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

make home work properly #12

Open
Raynes opened this issue Dec 15, 2011 · 8 comments
Open

make home work properly #12

Raynes opened this issue Dec 15, 2011 · 8 comments

Comments

@Raynes
Copy link
Owner

Raynes commented Dec 15, 2011

1b5e18e#commitcomment-796025

Blah. This can be fixed, but boy will it be ugly.

@Raynes
Copy link
Owner Author

Raynes commented Dec 18, 2011

Bandaid on the wound. I made it so that the path expansion stuff is explicit. We really do need to fix home though (which would fix path expansion as a side effect).

@xpe
Copy link

xpe commented Jan 4, 2015

@Raynes Does this problem remain? Perhaps it would help to add a small number of examples to reproduce the problems? (I'm about to start digging into ~ expansion with Java interop, so I can lend another set of eyes.)

@Raynes
Copy link
Owner Author

Raynes commented Jan 4, 2015

Yes. I'm not sure what I could add as an example. The problem is that fs doesn't actually know where ~<user> leads, because it doesn't necessarily have to be /home/<user>.

@xpe
Copy link

xpe commented Jan 5, 2015

@Raynes I don't see any examples. When I dig through the link above, I don't see a clear statement of the problem.

Now, at the risk of having no clarity on what the actual problem is, why is this hard? Why not just lookup the $HOME environment variable and convert ~ to it?

@Raynes
Copy link
Owner Author

Raynes commented Jan 5, 2015

Please read the linked thread. The problem is clearly defined.

~<user>/foo

We don't currently have a way to tell where 's home directory actually is. $HOME is not remotely cross platform, let alone even reliably set in every environment. Not sure how much more I can explain :P

@Raynes
Copy link
Owner Author

Raynes commented Jan 5, 2015

It's not necessarily hard either, I just haven't bothered.

@xpe
Copy link

xpe commented Jan 5, 2015

System.getProperty("user.home") works most of the time according to http://stackoverflow.com/questions/585534. Surely there is a respectable Java library that has already solved this?

Correction: System.getProperty("user.home") not $HOME.

@Raynes
Copy link
Owner Author

Raynes commented Jan 5, 2015

Fantastic question. Is there?

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

2 participants