Skip to content

File.exists?("broken_symlink") returns true #1945

@mpapis

Description

@mpapis
require 'fileutils'
File.open("nowhere.rb", "w") { |f| f.write "" }
FileUtils.ln_s("nowhere.rb", "link_to_nowhere.rb")
FileUtils.rm("nowhere.rb")
puts File.exists?("link_to_nowhere.rb")

returns false on MRI 1.9.3 - 2.1, returns true in JRuby 1.7.13 - 1.7.15

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions