mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/fileutils.rb (fu_same?): add djgpp and wince.
* lib/fileutils.rb (cannot_overwrite?): add wince. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0a50ed6611
commit
a74dd747e3
2 changed files with 12 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Wed Nov 19 14:32:08 2003 Minero Aoki <aamine@loveruby.net>
|
||||||
|
|
||||||
|
* lib/fileutils.rb (fu_same?): add djgpp and wince.
|
||||||
|
|
||||||
|
* lib/fileutils.rb (cannot_overwrite_file?): add wince.
|
||||||
|
|
||||||
Wed Nov 19 11:04:47 2003 NAKAMURA Usaku <usa@ruby-lang.org>
|
Wed Nov 19 11:04:47 2003 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
* lib/fileutils.rb (cannot_overwrite_file?, have_st_ino?): bccwin32
|
* lib/fileutils.rb (cannot_overwrite_file?, have_st_ino?): bccwin32
|
||||||
|
|
|
@ -464,8 +464,8 @@ module FileUtils
|
||||||
|
|
||||||
alias move mv
|
alias move mv
|
||||||
|
|
||||||
def cannot_overwrite_file? #:nodoc:
|
def cannot_overwrite_file? #:nodoc:
|
||||||
/djgpp|cygwin|mswin|mingw|bccwin/ === RUBY_PLATFORM
|
/djgpp|cygwin|mswin|mingw|bccwin|wince/ === RUBY_PLATFORM
|
||||||
end
|
end
|
||||||
private :cannot_overwrite_file?
|
private :cannot_overwrite_file?
|
||||||
|
|
||||||
|
@ -740,7 +740,9 @@ module FileUtils
|
||||||
|
|
||||||
def fu_same?( a, b )
|
def fu_same?( a, b )
|
||||||
if have_st_ino?
|
if have_st_ino?
|
||||||
File.stat(a).dev == File.stat(b).dev and File.stat(a).ino == File.stat(b).ino
|
st1 = File.stat(a)
|
||||||
|
st2 = File.stat(b)
|
||||||
|
st1.dev == st2.dev and st1.ino == st2.ino
|
||||||
else
|
else
|
||||||
File.expand_path(a) == File.expand_path(b)
|
File.expand_path(a) == File.expand_path(b)
|
||||||
end
|
end
|
||||||
|
@ -749,7 +751,7 @@ module FileUtils
|
||||||
end
|
end
|
||||||
|
|
||||||
def have_st_ino?
|
def have_st_ino?
|
||||||
/mswin|mingw|bccwin/ !~ RUBY_PLATFORM
|
/djgpp|mswin|mingw|bccwin|wince/ !~ RUBY_PLATFORM
|
||||||
end
|
end
|
||||||
|
|
||||||
def fu_stream_blksize( *streams )
|
def fu_stream_blksize( *streams )
|
||||||
|
|
Loading…
Reference in a new issue