Skip to content

File.symlink? fails on Windows, in 9.1.2.0 #3953

@mnepveu

Description

@mnepveu

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)

Exception in thread "AWT-EventQueue-0" org.jruby.exceptions.RaiseException: (ESRCH) No such process - FindFirstFile
    at RUBY.symlink?(uri:classloader:/jruby/kernel/file.rb:127)
    at RUBY.<module:Prawn>(uri:classloader:/gems/prawn-2.1.0/lib/prawn.rb:15)
    at RUBY.<top>(uri:classloader:/gems/prawn-2.1.0/lib/prawn.rb:11)
    at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:944)
    at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.rubygems.core_ext.kernel_require.require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:133)
...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions