bf_compact
Ben Finney
ben at benfinney.id.au
Fri May 13 03:45:29 CEST 2005
On 12-May-2005, David Relson wrote:
> Given the directory renaming, "bf_compact ." is problematical :-<
I've patched bogofilter to check this, by exiting if the CWD is within
the specified BOGOHOME.
You can register my GNU Arch archive:
$ baz register-archive http://www.zip.com.au/~bignose/archives/ben@benfinney.id.au--public-2005/
to get access to my revisions to bogofilter.
Or you can just read the patch:
--- orig/src/bf_compact
+++ mod/src/bf_compact
@@ -24,6 +24,13 @@
exit 1
fi
+BOGOHOME_CANONICAL=$(readlink --canonicalize $BOGOHOME)
+CWD_CANONICAL=$(readlink --canonicalize .)
+if [ $(echo $CWD_CANONICAL | grep $BOGOHOME_CANONICAL) ] ; then
+ echo "$BOGOHOME will be removed, cannot execute bf_compact here"
+ exit 1
+fi
+
# strip trailing slashes
while true; do
case "$BOGOHOME" in
--
\ "People demand freedom of speech to make up for the freedom of |
`\ thought which they avoid." -- Soren Aabye Kierkegaard |
_o__) (1813-1855) |
Ben Finney <ben at benfinney.id.au>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://www.bogofilter.org/pipermail/bogofilter/attachments/20050513/602f4b21/attachment.sig>
More information about the Bogofilter
mailing list