File.chmod fails after a chdir
------------------------------

                 Key: JRUBY-4927
                 URL: http://jira.codehaus.org/browse/JRUBY-4927
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.5.1
            Reporter: Antoine Toulme
            Assignee: Thomas E Enebo


chmod fails after a chdir (see the dev list of Buildr for context).

Try executing this is in irb:

require "fileutils"
path = '/tmp/somewhere'
FileUtils.mkpath path
FileUtils.mkpath File.join(path, "src")
Dir.chdir path

1.upto(4) do |i|
  File.open("src/file#{i}", "w+") {|f| f.write "file#{i} raw"}
end
Dir['src/*'].each { |file| p (File.stat(file).mode & 0o755) ; File.chmod(0o755, 
file) ; p (File.stat(file).mode & 0o755)}

You will see the mode of the file is not changed.

-- 
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