mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/fileutils.rb (touch): last #touch change causes error when :mtime option was not given.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e089d1161d
commit
738bf0e8a4
2 changed files with 7 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Sat Mar 3 22:54:33 2007 Minero Aoki <aamine@loveruby.net>
|
||||||
|
|
||||||
|
* lib/fileutils.rb (touch): last #touch change causes error when
|
||||||
|
:mtime option was not given.
|
||||||
|
|
||||||
Sat Mar 3 22:51:29 2007 Minero Aoki <aamine@loveruby.net>
|
Sat Mar 3 22:51:29 2007 Minero Aoki <aamine@loveruby.net>
|
||||||
|
|
||||||
* lib/fileutils.rb (mv): could not move directory between
|
* lib/fileutils.rb (mv): could not move directory between
|
||||||
|
|
|
@ -1012,13 +1012,9 @@ module FileUtils
|
||||||
fu_check_options options, OPT_TABLE['touch']
|
fu_check_options options, OPT_TABLE['touch']
|
||||||
list = fu_list(list)
|
list = fu_list(list)
|
||||||
created = nocreate = options[:nocreate]
|
created = nocreate = options[:nocreate]
|
||||||
t = options[:mtime]
|
t = options[:mtime] || Time.now
|
||||||
if options[:verbose]
|
if options[:verbose]
|
||||||
fu_output_message "touch #{
|
fu_output_message "touch #{nocreate ? ' -c' : ''}#{t ? t.strftime(' -t %Y%m%d%H%M.%S') : ''}#{list.join ' '}"
|
||||||
nocreate ? ' -c' : ''
|
|
||||||
}#{
|
|
||||||
t ? t.strftime(' -t %Y%m%d%H%M.%S') : ''
|
|
||||||
}#{list.join ' '}"
|
|
||||||
end
|
end
|
||||||
return if options[:noop]
|
return if options[:noop]
|
||||||
list.each do |path|
|
list.each do |path|
|
||||||
|
|
Loading…
Add table
Reference in a new issue