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 | edb9ab1b15d2326c7f0fbb0cef417b3d07140543 (patch) | |
tree | 9aa857fa499b99e6467bb4dc3b838b5a2779e51d /lib/fileutils.rb | |
parent | fe411ce2459932684cc6b8ee5b489768d2146d97 (diff) | |
download | ruby-edb9ab1b15d2326c7f0fbb0cef417b3d07140543.tar.gz |
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@4993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/fileutils.rb')
-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 0210e64f07..ee62f5838b 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 ) |