[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[leafnode-list] Re: texpire -n -C '<Message-ID:>'



Am 25.05.2011 01:36, schrieb Paul Brooks:
> 
> Hi All,
> 
> I've eventually started to play with texpire, can someone verify my findings please.
> 
> cat /path/msgNo
> result, it displays the message.
> Get '<Message-ID:>' from message.
> 
> -n for dry run
> texpire -n -C '<Message-ID:>'
> 
> cat /path/msgNo
> cat: /path/msgNo: No such file or directory
> 
> The message should not have been deleted as it was a dry run.

Right. Thanks for reporting this bug. The attached patch should fix it.


commit f8c3b831ea2af3de9036c3dbebcff27fbfcfeec4
Author: Matthias Andree <matthias.andree@xxxxxx>
Date:   Fri May 27 01:22:44 2011 +0200

    Bugfix: don't delete articles when texpire -n -C MessID is run.
    
    Found by Paul Brooks.

diff --git a/texpire.c b/texpire.c
index 663c730..da23a29 100644
--- a/texpire.c
+++ b/texpire.c
@@ -1123,7 +1123,9 @@ main(int argc, char **argv)
 	    while(optind < argc) {
 		if (verbose)
 		    printf("Trying to remove %s...\n", argv[optind]);
-		delete_article(argv[optind], "Remove", "Removed", 1);
+		if (!dryrun) {
+		    delete_article(argv[optind], "Remove", "Removed", 1);
+		}
 		optind++;
 	    }
 	    break;
-- 
_______________________________________________
leafnode-list mailing list
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
https://www.dt.e-technik.uni-dortmund.de/mailman/listinfo/leafnode-list
http://leafnode.sourceforge.net/