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

Comments

Projects
None yet
3 participants
@ahorek
Copy link
Contributor

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

This comment has been minimized.

Copy link
Member

commented Jul 13, 2015

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

@ahorek

This comment has been minimized.

Copy link
Contributor Author

commented Jul 13, 2015

  • 1.7.21 same result
@ahorek

This comment has been minimized.

Copy link
Contributor Author

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
You can’t perform that action at this time.