Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git] / rt / lib / RT / Shredder / Plugin / SQLDump.pm
index 2e7c259..7b59fee 100644 (file)
@@ -2,7 +2,7 @@
 #
 # COPYRIGHT:
 #
-# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
 #                                          <sales@bestpractical.com>
 #
 # (Except where explicitly superseded by other copyright notices)
@@ -89,8 +89,8 @@ sub Run
     my $query = $args{'Object'}->_AsInsertQuery;
     $query .= "\n" unless $query =~ /\n$/;
 
-    return print $fh $query or return (0, "Couldn't write to filehandle");
-    return 1;
+    return 1 if print $fh $query;
+    return (0, "Couldn't write to filehandle");
 }
 
 1;