[cvs] bogofilter/src bogohome.c,1.2,1.2.2.1
Fast Bayesian spam filter along lines suggested by Paul Graham
Brought to you by:
m-a
From: <m-...@us...> - 2004-03-23 01:45:22
|
Update of /cvsroot/bogofilter/bogofilter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20501/src Modified Files: Tag: branch-db-txn bogohome.c Log Message: Fix "wordlist.db/__db.001: Not a directory" when running bogoutil -d wordlist.db. Index: bogohome.c =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/src/bogohome.c,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -u -d -r1.2 -r1.2.2.1 --- bogohome.c 24 Feb 2004 18:16:56 -0000 1.2 +++ bogohome.c 23 Mar 2004 01:35:00 -0000 1.2.2.1 @@ -34,9 +34,12 @@ xfree(bogohome); bogohome = xstrdup(ds_file); - if (lstat(bogohome, &st) != 0 || !S_ISDIR(st.st_mode)) + if (lstat(bogohome, &st) != 0 || !S_ISDIR(st.st_mode)) { if ((t = strrchr(bogohome, DIRSEP_C))) *t = '\0'; + else + *bogohome = '\0'; + } if (!*bogohome) { free(bogohome); bogohome = xstrdup(CURDIR_S); |