diff options
author | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-11-20 10:16:27 +0000 |
---|---|---|
committer | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-11-20 10:16:27 +0000 |
commit | e4b24398c67ee11e628658f64fcf8f9d211d4b0f (patch) | |
tree | 9aa857fa499b99e6467bb4dc3b838b5a2779e51d /lib | |
parent | 2796b7b4714f0ae41b105061ff0983f7815fc79b (diff) | |
download | ruby-e4b24398c67ee11e628658f64fcf8f9d211d4b0f.tar.gz ruby-e4b24398c67ee11e628658f64fcf8f9d211d4b0f.tar.xz ruby-e4b24398c67ee11e628658f64fcf8f9d211d4b0f.zip |
* lib/fileutils.rb (have_st_ino?): emx (OS/2 with EMX) does not have st_ino (always 0). [ruby-dev:21972]
* lib/fileutils.rb (rename_cannot_overwrite_file?): emx does not allow overwriting files by rename(2).
* test/fileutils/test_fileutils.rb: windows? -> have_drive_letter?, have_file_perm?
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fileutils.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/fileutils.rb b/lib/fileutils.rb index 0210e64f0..ee62f5838 100644 --- a/lib/fileutils.rb +++ b/lib/fileutils.rb @@ -437,7 +437,7 @@ module FileUtils return if options[:noop] fu_each_src_dest(src, dest) do |s,d| - if cannot_overwrite_file? and File.file?(d) + if rename_cannot_overwrite_file? and File.file?(d) File.unlink d end @@ -464,10 +464,10 @@ module FileUtils alias move mv - def cannot_overwrite_file? #:nodoc: - /djgpp|cygwin|mswin|mingw|bccwin|wince/ === RUBY_PLATFORM + def rename_cannot_overwrite_file? #:nodoc: + /djgpp|cygwin|mswin|mingw|bccwin|wince|emx/ !~ RUBY_PLATFORM end - private :cannot_overwrite_file? + private :rename_cannot_overwrite_file? # @@ -751,7 +751,7 @@ module FileUtils end def have_st_ino? - /djgpp|mswin|mingw|bccwin|wince/ !~ RUBY_PLATFORM + /mswin|mingw|bccwin|wince|emx/ !~ RUBY_PLATFORM end def fu_stream_blksize( *streams ) |