-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
File.symlink? fails on Windows, in 9.1.2.0 #3953
Comments
Also, you may need to update If you do, I recommend validating this against the rubygems test suite at each step, however, as somehow win32-file breaks it. I'm not sure it's those methods in particular (I suspect it's basename/dirname), but you'll want to ensure these custom methods don't break anything there in particular. |
@djberg96 Not to derail the conversation, but is the Artistic 2.0 license compatible with JRuby's? I'd love to pull some of your stuff into jnr-posix, which I think would help Win32 compatibility more widely, but I don't want to fall on the wrong side of licensing. |
@nirvdrum As far as I know it's compatible. I'm probably going to switch everything over to Apache 2.0 soon. |
I get a similar error when trying to boot a Rails 4.0 app w/ Bundler and Apache Tomcat 8 Environment:
|
👍 I just reproduced it on my machine:
|
Would it be possible to use isSymbolicLink (https://docs.oracle.com/javase/8/docs/api/java/nio/file/Files.html#isSymbolicLink-java.nio.file.Path-) to check if the file is a symbolic link in this method ( jruby/core/src/main/ruby/jruby/kernel/file.rb Line 127 in c07da80
|
yep for 9.2 (master) definitely ... although some of the logic needs to stay - feel free to open up a PR |
Ok. Trank you! I‘ll give it a try :) |
@gerhardgruber Have any trouble making that PR? Can we help? |
@headius Actually I had some troubles building JRuby on my machine, but now it worked. I opened a PR. As it is my first contribution to JRuby I hope I did all right 😉 |
@gerhardgruber Looks good to me! I've wanted to start using Java 7 NIO.2 APIs to replace some of our logic, so this is great! Feel free to replace other things that we know work properly with NIO.2! |
Fixed by #4852. Thanks! |
sorry - false alarm |
Calling File.symlink? throws an exception on jruby 9.1.2.0, on Windows.
Environment:
jruby 9.1.2.0 (complete jar)
Windows 10
Java SE 1.8 u 91
Prawn 2.1
Code from Prawn:
file = File.readlink(file) if File.symlink?(file)
The text was updated successfully, but these errors were encountered: