diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | lib/fileutils.rb | 4 |
2 files changed, 8 insertions, 2 deletions
@@ -1,3 +1,9 @@ +Fri Jul 5 19:05:40 2013 Akinori MUSHA <knu@iDaemons.org> + + * lib/fileutils.rb (FileUtils#chown, FileUtils#chown_R): Fix the + wrong output message when user is nil, which should be "chown + :group file" instead of "chown group file". + Fri Jul 5 16:21:56 2013 Akinori MUSHA <knu@iDaemons.org> * test/ruby/test_regexp.rb diff --git a/lib/fileutils.rb b/lib/fileutils.rb index cee60892fa..806ee2544f 100644 --- a/lib/fileutils.rb +++ b/lib/fileutils.rb @@ -1045,7 +1045,7 @@ module FileUtils fu_check_options options, OPT_TABLE['chown'] list = fu_list(list) fu_output_message sprintf('chown %s%s', - [user,group].compact.join(':') + ' ', + (group ? [user,group].join(':') : 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' : ''), - [user,group].compact.join(':') + ' ', + (group ? [user,group].join(':') : user) + ' ', list.join(' ')) if options[:verbose] return if options[:noop] uid = fu_get_uid(user) |