* 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/trunk@41851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
knu 2013-07-09 07:01:59 +00:00
parent 8ce3f4beea
commit 02f61f874a
2 changed files with 9 additions and 4 deletions

View File

@ -1,3 +1,8 @@
Tue Jul 9 15:03:24 2013 Akinori MUSHA <knu@iDaemons.org>
* lib/fileutils.rb (FileUtils#chown, FileUtils#chown_R): If user
and group are both nil, print ":".
Tue Jul 9 12:47:08 2013 Masaki Matsushita <glass.saga@gmail.com>
* io.c (appendline): use READ_CHAR_PENDING_XXX macros and

View File

@ -1045,7 +1045,7 @@ module FileUtils
fu_check_options options, OPT_TABLE['chown']
list = fu_list(list)
fu_output_message sprintf('chown %s %s',
(group ? [user,group].join(':') : user) + ' ',
(group ? "#{user}:#{group}" : user || ':'),
list.join(' ')) if options[:verbose]
return if options[:noop]
uid = fu_get_uid(user)
@ -1075,7 +1075,7 @@ module FileUtils
list = fu_list(list)
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)