[Rt-commit] r10166 - in rt/branches/3.999-DANGEROUS: lib/RT

jesse at bestpractical.com jesse at bestpractical.com
Fri Dec 28 00:14:21 EST 2007


Author: jesse
Date: Fri Dec 28 00:14:20 2007
New Revision: 10166

Modified:
   rt/branches/3.999-DANGEROUS/   (props changed)
   rt/branches/3.999-DANGEROUS/lib/RT/Test.pm

Log:
 r74263 at pinglin:  jesse | 2007-12-28 00:08:50 -0500
 fewer complaints when the mail log doesn't exist.


Modified: rt/branches/3.999-DANGEROUS/lib/RT/Test.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Test.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Test.pm	Fri Dec 28 00:14:20 2007
@@ -361,13 +361,15 @@
     $path = File::Spec->catfile( @$path ) if ref $path;
 
     diag "reading content of '$path'" if $ENV{'TEST_VERBOSE'};
-
+    my $content = '';
+    if (-f $path) {
     open my $fh, "<:raw", $path
         or do { warn "couldn't open file '$path': $!"; return '' };
-    my $content = do { local $/; <$fh> };
+    $content = do { local $/; <$fh> };
     close $fh;
-
+    
     unlink $path if $args{'unlink'};
+    }
 
     return $content;
 }


More information about the Rt-commit mailing list