diff options
| author | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-11-18 13:24:48 +0000 |
|---|---|---|
| committer | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-11-18 13:24:48 +0000 |
| commit | bdf2aa72220d041531e51ab49ddc87ab008bee0f (patch) | |
| tree | 965684cd30c68ae21e290d92e3ef848f77a35ae7 /lib | |
| parent | 0e521365499255f99989a150327d915a2ed9abd1 (diff) | |
| download | ruby-bdf2aa72220d041531e51ab49ddc87ab008bee0f.tar.gz ruby-bdf2aa72220d041531e51ab49ddc87ab008bee0f.tar.xz ruby-bdf2aa72220d041531e51ab49ddc87ab008bee0f.zip | |
* lib/fileutils.rb (fu_same?): temporal fix for windows.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/fileutils.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/fileutils.rb b/lib/fileutils.rb index 9b50aec91..bcc7b8d7d 100644 --- a/lib/fileutils.rb +++ b/lib/fileutils.rb @@ -465,7 +465,7 @@ module FileUtils alias move mv def cannot_overwrite_file? #:nodoc: - /djgpp|cygwin|mswin32/ === RUBY_PLATFORM + /djgpp|cygwin|mswin|mingw/ === RUBY_PLATFORM end private :cannot_overwrite_file? @@ -739,11 +739,19 @@ module FileUtils end def fu_same?( a, b ) - File.stat(a).ino == File.stat(b).ino + if have_st_ino? + File.stat(a).dev == File.stat(b).dev and File.stat(a).ino == File.stat(b).ino + else + File.expand_path(a) == File.expand_path(b) + end rescue Errno::ENOENT return false end + def have_st_ino? + /mswin|mingw/ !~ RUBY_PLATFORM + end + def fu_stream_blksize( *streams ) streams.each do |s| next unless s.respond_to?(:stat) |
