[前][次][番号順一覧][スレッド一覧]

ruby-changes:29744

From: knu <ko1@a...>
Date: Fri, 5 Jul 2013 19:08:16 +0900 (JST)
Subject: [ruby-changes:29744] knu:r41796 (trunk): * lib/fileutils.rb (FileUtils#chown, FileUtils#chown_R): Fix the

knu	2013-07-05 19:07:41 +0900 (Fri, 05 Jul 2013)

  New Revision: 41796

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41796

  Log:
    * 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".

  Modified files:
    trunk/ChangeLog
    trunk/lib/fileutils.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 41795)
+++ ChangeLog	(revision 41796)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Jul  5 19:05:40 2013  Akinori MUSHA  <knu@i...>
+
+	* 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@i...>
 
 	* test/ruby/test_regexp.rb
Index: lib/fileutils.rb
===================================================================
--- lib/fileutils.rb	(revision 41795)
+++ lib/fileutils.rb	(revision 41796)
@@ -1045,7 +1045,7 @@ module FileUtils https://github.com/ruby/ruby/blob/trunk/lib/fileutils.rb#L1045
     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 https://github.com/ruby/ruby/blob/trunk/lib/fileutils.rb#L1075
     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)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]