diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-13 14:27:32 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-13 14:27:32 +0000 |
commit | 26ade0f2f664d02b5410d68a00aa5be17c050b5f (patch) | |
tree | 8564cf3b0056fd4841d3608fd82f8bff8c0d4112 /lib/fileutils.rb | |
parent | 57ec0834a1fdd759d942feba1568305853d77270 (diff) |
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
Diffstat (limited to 'lib/fileutils.rb')
-rw-r--r-- | lib/fileutils.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/fileutils.rb b/lib/fileutils.rb index 723ad91000..8b001cc6d7 100644 --- a/lib/fileutils.rb +++ b/lib/fileutils.rb @@ -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) |