Skip to content

Commit

Permalink
* lib/ftools.rb (syscopy): chmod destination file only if
Browse files Browse the repository at this point in the history
  it does not exist.


git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
eban committed May 7, 2001
1 parent daa7113 commit b82260b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -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.
Expand Down
3 changes: 2 additions & 1 deletion lib/ftools.rb
Expand Up @@ -26,6 +26,7 @@ def syscopy from, to

fmode = stat(from).mode
tpath = to
not_exist = !exist?(tpath)

from = open(from, "r")
from.binmode
Expand All @@ -50,7 +51,7 @@ def syscopy from, to
to.close
from.close
end
chmod(fmode, tpath)
chmod(fmode, tpath) if not_exist
ret
end

Expand Down
4 changes: 2 additions & 2 deletions version.h
@@ -1,4 +1,4 @@
#define RUBY_VERSION "1.7.0"
#define RUBY_RELEASE_DATE "2001-05-02"
#define RUBY_RELEASE_DATE "2001-05-07"
#define RUBY_VERSION_CODE 170
#define RUBY_RELEASE_CODE 20010502
#define RUBY_RELEASE_CODE 20010507

0 comments on commit b82260b

Please sign in to comment.