From 460530eab138a4c959be884fb86c9b3579ba6141 Mon Sep 17 00:00:00 2001 From: shyouhei Date: Thu, 8 Mar 2007 08:46:08 +0000 Subject: * merge -c 11988 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_5@12018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ lib/fileutils.rb | 8 ++++++-- version.h | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index f141f91fdf..e8bcc5e0ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Mar 4 23:53:27 2007 Minero Aoki + + * lib/fileutils.rb (mv): could not move a directory between + different filesystems. [ruby-dev:30411] + Sat Mar 3 21:41:31 2007 Akinori MUSHA * eval.c (stack_check): Unset inline to fix build with GCC 3.4.6; 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 diff --git a/version.h b/version.h index d72557fe66..0d391a2234 100644 --- a/version.h +++ b/version.h @@ -2,7 +2,7 @@ #define RUBY_RELEASE_DATE "2007-03-08" #define RUBY_VERSION_CODE 185 #define RUBY_RELEASE_CODE 20070308 -#define RUBY_PATCHLEVEL 27 +#define RUBY_PATCHLEVEL 28 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 -- cgit v1.2.3