1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/fileutils.rb (mv): could not move directory between different file systems. [ruby-dev:30411]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
aamine 2007-03-03 13:53:38 +00:00
parent 15dabe8216
commit e089d1161d
2 changed files with 12 additions and 3 deletions

View file

@ -1,3 +1,8 @@
Sat Mar 3 22:51:29 2007 Minero Aoki <aamine@loveruby.net>
* lib/fileutils.rb (mv): could not move directory between
different file systems. [ruby-dev:30411]
Sat Mar 3 22:37:02 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* file.c (rb_file_s_utime): allow nil to set the current time.

View file

@ -1,7 +1,7 @@
#
# = fileutils.rb
#
# Copyright (c) 2000-2006 Minero Aoki
# Copyright (c) 2000-2007 Minero Aoki
#
# This program is free software.
# You can distribute/modify this program under the same terms of ruby.
@ -504,7 +504,11 @@ module FileUtils
File.rename s, d
rescue Errno::EXDEV
copy_entry s, d, true
File.unlink s
if options[:secure]
remove_entry_secure s, options[:force]
else
remove_entry s, options[:force]
end
end
rescue SystemCallError
raise unless options[:force]
@ -517,7 +521,7 @@ module FileUtils
module_function :move
OPT_TABLE['mv'] =
OPT_TABLE['move'] = [:force, :noop, :verbose]
OPT_TABLE['move'] = [:force, :noop, :verbose, :secure]
def rename_cannot_overwrite_file? #:nodoc:
/djgpp|cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM