summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-08-05 08:40:11 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-08-05 08:40:11 +0000
commit223327a4ad98024dc47d32cc6c9acbe33cb32214 (patch)
tree41dccf6dbcc4dcd61f892fb4fd69624a084649ae
parent3a2ac278d65e87ab273c1bac52f8a5f81dd904fd (diff)
downloadruby-223327a4ad98024dc47d32cc6c9acbe33cb32214.tar.gz
eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_4@875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--lib/ftools.rb9
2 files changed, 12 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 1f58347d53..98fe929573 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sat Aug 5 16:43:43 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+
+ * lib/ftools.rb (compare, safe_unlink, chmod): avoid warnings.
+
+ * lib/ftools.rb (move): typo. not `tpath', but `to'.
+
Sat Jul 29 23:42:04 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
* dir.c (dir_each): should check whether dir is closed during the
diff --git a/lib/ftools.rb b/lib/ftools.rb
index 39d6ca9462..369a6177d2 100644
--- a/lib/ftools.rb
+++ b/lib/ftools.rb
@@ -81,7 +81,7 @@ class << File
syscopy from, to and unlink from
utime(from_stat.atime, from_stat.mtime, to)
begin
- chown(fstat.uid, fstat.gid, tpath)
+ chown(fstat.uid, fstat.gid, to)
rescue
end
end
@@ -110,7 +110,8 @@ class << File
begin
while fr == tr
- if fr = from.read(fsize)
+ fr = from.read(fsize)
+ if fr
tr = to.read(fr.size)
else
ret = to.read(fsize)
@@ -136,7 +137,7 @@ class << File
begin
$stderr.print files.join(" "), "\n" if verbose
chmod 0777, *files
- unlink *files
+ unlink(*files)
rescue
# STDERR.print "warning: Couldn't unlink #{files.join ' '}\n"
end
@@ -163,11 +164,13 @@ class << File
alias o_chmod chmod
+ vsave, $VERBOSE = $VERBOSE, false
def chmod(mode, *files)
verbose = if files[-1].is_a? String then false else files.pop end
$stderr.printf "chmod %04o %s\n", mode, files.join(" ") if verbose
o_chmod mode, *files
end
+ $VERBOSE = vsave
def install(from, to, mode = nil, verbose = false)
to = catname(from, to)