sync with 0.7.4cvs21
[claws.git] / tools / filter_conv.pl
index 4265a24a95f71c576638736a08208b601b5b87d1..f84802b7c2c3971ee320abdd6f260391cab6eea0 100644 (file)
@@ -37,6 +37,11 @@ open (FILTERRC, "<filterrc") || die("Can't find your old filter rules\n");
 @filterrc = <FILTERRC>;
 close FILTERRC;
 
+if (!@filterrc) {
+       print "\nYou don't have any filter rules\n\n";
+       exit;
+}
+
 $WRITE_THIS = "";
 $COUNT      = "0";
 
@@ -84,7 +89,10 @@ open (MATCHERRC, ">matcherrc");
 print MATCHERRC $WRITE_THIS;
 close MATCHERRC;
 
+rename ("filterrc","filterrc.old");
+
 print "\nYou have sucessfully converted $COUNT filtering rules\n\n";
+print "'filterrc' has been renamed 'filterrc.old'\n\n";
 exit;
 
 sub sort_data {