Re: bf_compact ruined my wordlist.db

David Relson <[email protected]>
Newsgroups gmane.mail.bogofilter.general
Organization Osage Software Systems, Inc.
Message-ID <[email protected]>
On Sat, 05 Jan 2008 12:23:09 +0200
Hussam Al-Tayeb wrote:

...[snip]...

> I know how to reproduce this. cd to you home  ( not to the .bogofilter
> folder)
> 
> 1. cd ~      ## This takes you to your home dir.
> 2. bf_compact ~/.bogofilter/ wordlist.db    ## yes, I know this isn't
> the correct syntax.
> 
> The old intact database is still in "~/.bogofilter.old" but
> "~/.bogofilter" now contains an empty database.

Hussam,

Thank you for your tip on reproducing problem.  Using your method and
my "-x" on the #! line, produced the following interesting output:

 + for FILE in '$FILES'
 ++ basename wordlist.db
 + NAME=wordlist.db
 + bogoutil -d wordlist.db
 + bogoutil --db-transaction=no -l bf_compact.13637/wordlist.db
 Can't open wordlist './wordlist.db'

As can be seen, the "bogoutil -d wordlist.db" command lacks a directory
name. It should read "bogoutil -d ~/.bogofilter/wordlist.db".

Here's the patch for bf_compact:

----- begin patch -----
--- bf_compact.old	2008-01-05 15:19:20.000000000 -0500
+++ bf_compact	2008-01-05 15:17:44.000000000 -0500
@@ -66,7 +66,7 @@
 # reload files
 for FILE in $FILES ; do
     NAME=`basename $FILE`
-    bogoutil -d $FILE | bogoutil --db-transaction=no -l $BOGOTEMP/$NAME
+    bogoutil -d $BOGOHOME/$FILE | bogoutil --db-transaction=no -l
$BOGOTEMP/$NAME done
 
 if [ $TXN = "yes" ] ; then
----- end patch -----

I've also attached a fixed copy of bf_compact.

_______________________________________________
Bogofilter mailing list
[email protected]
http://www.bogofilter.org/mailman/listinfo/bogofilter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.