* lib/ftools.rb (syscopy): chmod destination file only if
it does not exist. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e9d89f20a9
commit
075169f071
@ -1,3 +1,8 @@
|
||||
Mon May 7 15:45:48 2001 WATANABE Hirofumi <eban@ruby-lang.org>
|
||||
|
||||
* lib/ftools.rb (syscopy): chmod destination file only if
|
||||
it does not exist.
|
||||
|
||||
Thu May 3 03:15:06 2001 SHIROYAMA Takayuki <psi@fortune.nest.or.jp>
|
||||
|
||||
* configure.in: get --enable-shared to work on MacOS X.
|
||||
|
@ -26,6 +26,7 @@ class << File
|
||||
|
||||
fmode = stat(from).mode
|
||||
tpath = to
|
||||
not_exist = !exist?(tpath)
|
||||
|
||||
from = open(from, "r")
|
||||
from.binmode
|
||||
@ -50,7 +51,7 @@ class << File
|
||||
to.close
|
||||
from.close
|
||||
end
|
||||
chmod(fmode, tpath)
|
||||
chmod(fmode, tpath) if not_exist
|
||||
ret
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user