mirror of
https://github.com/ruby/ruby.git
synced 2025-09-17 17:43:59 +02:00
merge revision(s) 41851:
* lib/fileutils.rb (FileUtils#chown, FileUtils#chown_R): If user and group are both nil, print ":". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@41945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
57ec0834a1
commit
26ade0f2f6
3 changed files with 10 additions and 5 deletions
|
@ -1022,8 +1022,8 @@ module FileUtils
|
|||
def chown(user, group, list, options = {})
|
||||
fu_check_options options, OPT_TABLE['chown']
|
||||
list = fu_list(list)
|
||||
fu_output_message sprintf('chown %s%s',
|
||||
(group ? [user,group].join(':') : user) + ' ',
|
||||
fu_output_message sprintf('chown %s %s',
|
||||
(group ? "#{user}:#{group}" : user || ':'),
|
||||
list.join(' ')) if options[:verbose]
|
||||
return if options[:noop]
|
||||
uid = fu_get_uid(user)
|
||||
|
@ -1051,9 +1051,9 @@ module FileUtils
|
|||
def chown_R(user, group, list, options = {})
|
||||
fu_check_options options, OPT_TABLE['chown_R']
|
||||
list = fu_list(list)
|
||||
fu_output_message sprintf('chown -R%s %s%s',
|
||||
fu_output_message sprintf('chown -R%s %s %s',
|
||||
(options[:force] ? 'f' : ''),
|
||||
(group ? [user,group].join(':') : user) + ' ',
|
||||
(group ? "#{user}:#{group}" : user || ':'),
|
||||
list.join(' ')) if options[:verbose]
|
||||
return if options[:noop]
|
||||
uid = fu_get_uid(user)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue