avoid File::Compare warning when passed handles (from Nick
Gurusamy Sarathy [Wed, 22 Mar 2000 16:55:42 +0000 (16:55 +0000)]
Ing-Simmons)

p4raw-id: //depot/perl@5880

lib/File/Compare.pm

index 8a8afac..667e7cb 100644 (file)
@@ -78,7 +78,7 @@ sub compare {
     }
     else {
        unless (defined($size) && $size > 0) {
-           $size = $fromsize;
+           $size = $fromsize || -s TO || 0;
            $size = 1024 if $size < 512;
            $size = $Too_Big if $size > $Too_Big;
        }