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

Fake prefix for canonicalizing classpaths slightly off on Windows #4645

Closed
presidentbeef opened this issue Jun 3, 2017 · 2 comments
Closed
Assignees

Comments

@presidentbeef
Copy link

The path generated on Windows by the fix in #4543 is off by two characters (the drive letter).

To reproduce, use this repo and follow the README.

The output on Windows will be:

$ java -jar myapp.jar
Errno::ENOENT: No such file or directory - classpath:BY\jar-bootstrap.rb
          realpath at org/jruby/RubyFile.java:864
  require_relative at uri:classloader:/jruby/kernel/kernel.rb:11
            <main> at classpath:/jar-bootstrap.rb:1

As noted here, this is because the path is expanded to include the drive. The fake prefix /THIS_IS_A_FAKE_PATH_FOR_JRUBY becomes something like C:/THIS_IS_A_FAKE_PATH_FOR_JRUBY. When it's supposed to be removed from the resulting path the BY is left over.

@kares kares self-assigned this Jun 5, 2017
@kares
Copy link
Member

kares commented Jun 5, 2017

will mark this as a duplicate of #4630 (same issue)

@kares kares closed this as completed Jun 5, 2017
@kares kares added this to the Invalid or Duplicate milestone Jun 5, 2017
kares added a commit to kares/jruby that referenced this issue Jun 5, 2017
has been attempted at cbf9a7d
... using a fake root path, however on Windows /SMT expands as C:\SMT

added '__' at the end so its more obvious if this is slightly off again

closes jruby#4630 (also jruby#4645)
@presidentbeef
Copy link
Author

Thank you @kares! 🚀

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