なひです.

> From: NAKAMURA, Hiroshi [mailto:nakahiro / sarion.co.jp]
> Sent: Friday, October 08, 1999 3:31 PM

> まぁタイムスタンプベースで比較する以上,仕方ないですね.^^;

結局自分で踏んでしまいました(涙
悔しかったので,サイズも見るようにしてみました.
[ruby-list:17546]のPatchを当てたもの,へのPatchです.

--
NaHi, nakahiro, a.k.a. NAKAMURA, Hiroshi
http://www.sarion.com  Sarion Systems Research

	/	/	/

--- ftpmirror.p1	Tue Oct 12 17:13:02 1999
+++ ftpmirror	Tue Oct 12 17:14:27 1999
@@ -100,5 +100,6 @@
     remote_dirs = [];
     remote_filetimes = {}
-    check_remote_files(directory, remote_dirs, remote_filetimes)
+    remote_filesizes = {}
+    check_remote_files(directory, remote_dirs, remote_filetimes, remote_filesizes)
     Dir.foreach(directory) do |file|
       longname = directory + "/" + file
@@ -114,6 +115,8 @@
 	else
 	  if not longname =~ @ignore_file_regexp and
+	      ((not remote_filesizes.has_key?(file) or
+	       remote_filesizes[file] != File.size(longname)) or
 	      (not remote_filetimes.has_key?(file) or
-	       remote_filetimes[file] < File.mtime(longname))
+	       remote_filetimes[file] < File.mtime(longname)))
 	    updatefile(longname)
 	  end
@@ -131,5 +134,5 @@
   end
   
-  def check_remote_files(directory, dirs, filetimes)
+  def check_remote_files(directory, dirs, filetimes, filesizes)
     @ftp.list("-alL "+directory) do |line|
       unless line =~ /^total/
@@ -143,17 +146,18 @@
 	  filename = $&
 	  case line
-	  when /([A-Z][a-z][a-z]) +(\d+) (\d\d):(\d\d)/
-	    time = Time.mktime(Time.now.year,
-			       $1, $2, $3, $4, "59")
+	  when /(\d+) ([A-Z][a-z][a-z]) +(\d+) (\d\d):(\d\d)/
+	    size = $1
+	    time = Time.mktime(Time.now.year, $2, $3, $4, $5, "59")
 	    if time > Time.now
-	      time = Time.mktime(Time.now.year - 1,
-				 $1, $2, $3, $4, "59")
+	      time = Time.mktime(Time.now.year - 1, $2, $3, $4, $5, "59")
 	    end
-	  when /([A-Z][a-z][a-z]) +(\d+) +(\d\d\d\d)/
-	    time = Time.mktime($3, $1, $2, "23", "59", "59")
+	  when /(\d+) ([A-Z][a-z][a-z]) +(\d+) +(\d\d\d\d)/
+	    size = $1
+	    time = Time.mktime($4, $2, $3, "23", "59", "59")
 	  else
 	    raise "unknown time format: " + line
 	  end
 	  filetimes[filename] = time
+	  filesizes[filename] = size.to_i
 	end
       end