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

expandPathInternal Windows compatibility #3132

Closed
ahorek opened this issue Jul 13, 2015 · 3 comments · Fixed by #3167
Closed

expandPathInternal Windows compatibility #3132

ahorek opened this issue Jul 13, 2015 · 3 comments · Fixed by #3167

Comments

@ahorek
Copy link
Contributor

ahorek commented Jul 13, 2015

MRI: File.realpath 'c:/test' => 'c:/test'
jRuby: File.realpath 'c:/test' => 'C:\ \test' (tested on 1.7.19 and 9.0.0.0 rc2)

It causes problems in Rails applications, because Rails.root path is invalid.

// if (IS_WINDOWS) {

@headius headius added this to the JRuby 1.7.22 milestone Jul 13, 2015
@headius
Copy link
Member

headius commented Jul 13, 2015

You might test 1.7.21 but I don't expect it to be fixed there.

@ahorek
Copy link
Contributor Author

ahorek commented Jul 13, 2015

  • 1.7.21 same result

@ahorek
Copy link
Contributor Author

ahorek commented Jul 22, 2015

https://github.com/jruby/jruby/blob/master/core/src/main/java/org/jruby/RubyFile.java#L1632

=> realPath = JRubyFile.normalizeSeps(new File(realPath).getCanonicalPath());

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

Successfully merging a pull request may close this issue.

3 participants