summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-03-08 08:46:08 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-03-08 08:46:08 +0000
commit460530eab138a4c959be884fb86c9b3579ba6141 (patch)
treedff52b0bb248623efa600f1887a71dc8998fb6d6 /lib
parentbd7d6742f90a977493960565ae5da26d60fb894b (diff)
* merge -c 11988
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_5@12018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/fileutils.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/fileutils.rb b/lib/fileutils.rb
index 0459a4511f..decd792eec 100644
--- a/lib/fileutils.rb
+++ b/lib/fileutils.rb
@@ -501,7 +501,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]
@@ -514,7 +518,7 @@ module FileUtils
module_function :move
OPT_TABLE['mv'] =
- OPT_TABLE['move'] = %w( noop verbose force )
+ OPT_TABLE['move'] = [:force, :noop, :verbose, :secure]
def rename_cannot_overwrite_file? #:nodoc:
/djgpp|cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM