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

'/' works as a valid path but children don't (under windows) #1653

Closed
walkeriniraq opened this issue Apr 24, 2014 · 1 comment
Closed

'/' works as a valid path but children don't (under windows) #1653

walkeriniraq opened this issue Apr 24, 2014 · 1 comment

Comments

@walkeriniraq
Copy link

>> require 'pathname'
>> Pathname.new('/').exist?
=> true
>> Pathname.new('/').children.first.exist?
=> false
>> Pathname.new('C:\\').children.first.exist?
=> true

This is maybe a little obscure but Java considers C:\ to be equivalent to *nix root. And pathname seems to as well, but anything under root isn't recognized. Having this problem in the File class as well, just not as pretty to demo.

Tested under 1.7.12 and 1.7.9 with Java 8 and Win7. Problem exists in all compatibility modes as well.

@enebo enebo closed this as completed in e31f567 Feb 24, 2017
@enebo enebo added this to the JRuby 9.1.8.0 milestone Feb 24, 2017
@enebo
Copy link
Member

enebo commented Feb 24, 2017

As we are EOL'ing 1.7.x soon we did not fix it there. All are encouraged to upgrade to 9.x.

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

No branches or pull requests

2 participants