mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Octal mode
* lib/fileutils.rb (symbolic_modes_to_i): support octal mode string. fix up r55513. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8b251c6c2c
commit
d34b3c9a0f
1 changed files with 1 additions and 0 deletions
|
@ -812,6 +812,7 @@ module FileUtils
|
|||
private_module_function :apply_mask
|
||||
|
||||
def symbolic_modes_to_i(mode_sym, path) #:nodoc:
|
||||
return mode_sym.oct if /\A[0-7]+\z/ =~ mode_sym
|
||||
mode = if File::Stat === path
|
||||
path.mode
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue