File.rename does not report correct error codes
-----------------------------------------------

                 Key: JRUBY-3381
                 URL: http://jira.codehaus.org/browse/JRUBY-3381
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.1.6
            Reporter: Ittay Dror


this happens to me under HPUX 11.11.

in jirb session:
bash-2.04# jirb
irb(main):001:0> File.rename '/tmp/foo', '/foo'
Errno::EACCES: Permission denied - Permission denied - /tmp/foo or /foo
        from (irb):2

in irb session:
bash-2.04# irb 
irb(main):001:0> File.rename '/tmp/foo', '/foo'
Errno::EXDEV: Cross-device link - /tmp/foo or /foo
        from (irb):1:in `rename'
        from (irb):1

tracing system calls, the underlying rename does report EXDEV

Note that FileUtils.mv relies on EXDEV: it first tries a rename and if the 
error is EXDEV, it does a copy.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to