Bug#251117: acknowledged by developer (Bug#251117: fixed in bogofilter 0.91.0-2)

David Relson relson at osagesoftware.com
Fri Jun 4 15:39:17 CEST 2004


On Thu, 3 Jun 2004 10:05:39 -0400
Clint Adams wrote:

> David, in check_directory(), bogofilter does a stat on the directory
> without tilde expansion.
> 
> > rwatkins at jeeves:~$ strace -e stat,stat64 bogofilter -Q
> > stat64("~/.bogofilter", 0xbffffa6c)     = -1 ENOENT (No such file or
> > directory)
> > Error creating directory '~/.bogofilter': No such file or directory
> > stat64("/home/rwatkins/.bogofilter", {st_mode=S_IFDIR|0700,
> > st_size=80,...}) = 0

Hi Clint,

Thanks for the report.  Here's the fix :-)

David

Index: wordlists_base.c
===================================================================
RCS file: /cvsroot/bogofilter/bogofilter/src/wordlists_base.c,v
retrieving revision 1.19
diff -u -r1.19 wordlists_base.c
--- wordlists_base.c	22 May 2004 15:48:31 -0000	1.19
+++ wordlists_base.c	4 Jun 2004 13:37:44 -0000
@@ -3,6 +3,7 @@
 #include "common.h"
 
 #include "bogohome.h"
+#include "find_home.h"
 #include "paths.h"
 #include "wordlists.h"
 #include "wordlists_base.h"
@@ -92,7 +93,7 @@
     if (precedence < saved_precedence)
 	return rc;
 
-    dir = (d != NULL) ? xstrdup(d) : get_directory(precedence);
+    dir = (d != NULL) ? tildeexpand(d, true) :
get_directory(precedence);
     if (dir == NULL)
 	return -1;
 



More information about the bogofilter-dev mailing list