Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.1RC2
    • Fix Version/s: JRuby 1.1
    • Component/s: Core Classes/Modules
    • Labels:
      None
    • Environment:
      JRuby 1.1RC2, Linux, Windows
    • Number of attachments :
      0

      Description

      Pure Java lstat accepts non-existing files:

      jruby -J-Djruby.native.enabled=false -e "p File.lstat('doesnt-exist').size"

      But, with native:
      jruby -J-Djruby.native.enabled=true -e "p File.lstat('doesnt-exist').size"
      -e:1: No such file or directory - No such file or directory - /opt/work/jruby.git/doesnt-exist (Errno::ENOENT)

        Activity

        Hide
        Charles Oliver Nutter added a comment -

        I commited a partial fix for this, so that if a file/link is totally not there, it will raise an error. It does not, however, fix the case where it should be happy if there's a symlink that points at a non-existent file, where lstat should succeed with no error. Moving to 1.1+ for additional study and work on that case.

        Show
        Charles Oliver Nutter added a comment - I commited a partial fix for this, so that if a file/link is totally not there, it will raise an error. It does not, however, fix the case where it should be happy if there's a symlink that points at a non-existent file, where lstat should succeed with no error. Moving to 1.1+ for additional study and work on that case.
        Charles Oliver Nutter made changes -
        Field Original Value New Value
        Fix Version/s JRuby 1.1+ [ 13421 ]
        Fix Version/s JRuby 1.1 [ 13990 ]
        Hide
        Charles Oliver Nutter added a comment -

        Retroactively marking as fixed. There's simply no way from Java to determine that a symlink exists but the file it references does not. We can only go with the simple result that Java gives us. Ultimately, the fix that was in 1.1 is the best we can do for now.

        Show
        Charles Oliver Nutter added a comment - Retroactively marking as fixed. There's simply no way from Java to determine that a symlink exists but the file it references does not. We can only go with the simple result that Java gives us. Ultimately, the fix that was in 1.1 is the best we can do for now.
        Charles Oliver Nutter made changes -
        Assignee Charles Oliver Nutter [ headius ]
        Fix Version/s JRuby 1.1 [ 13990 ]
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s JRuby 1.x+ [ 13421 ]
        Charles Oliver Nutter made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Charles Oliver Nutter
            Reporter:
            Vladimir Sizikov
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: