expandPathInternal Windows compatibility #3132

Closed
ahorek opened this Issue Jul 13, 2015 · 3 comments

Comments

Projects
None yet
3 participants
@ahorek
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

This comment has been minimized.

Show comment
Hide comment
@headius

headius Jul 13, 2015

Member

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

Member

headius 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.

Show comment
Hide comment
@ahorek

ahorek Jul 13, 2015

Contributor
  • 1.7.21 same result
Contributor

ahorek commented Jul 13, 2015

  • 1.7.21 same result
@ahorek

This comment has been minimized.

Show comment
Hide comment
@ahorek

ahorek Jul 22, 2015

Contributor

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

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

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