Revision 54c569fb src/sylfilter.c
| b/src/sylfilter.c | ||
|---|---|---|
| 38 | 38 |
MODE_SHOW_STATUS |
| 39 | 39 |
}; |
| 40 | 40 |
|
| 41 |
#define DB_DIR ".sylfilter" |
|
| 42 |
|
|
| 43 | 41 |
|
| 44 | 42 |
static int verbose = 0; |
| 45 | 43 |
|
| ... | ... | |
| 55 | 53 |
int i; |
| 56 | 54 |
int mode = MODE_TEST_JUNK; |
| 57 | 55 |
int count = 0; |
| 58 |
char dbpath[1024];
|
|
| 56 |
const char *dbpath;
|
|
| 59 | 57 |
#ifdef USE_QDBM |
| 60 | 58 |
const char *engine = "qdbm"; |
| 61 | 59 |
#elif defined(USE_SQLITE) |
| ... | ... | |
| 119 | 117 |
if (verbose) |
| 120 | 118 |
printf("engine %s has been selected\n", engine);
|
| 121 | 119 |
|
| 122 |
snprintf(dbpath, sizeof(dbpath), "%s/" DB_DIR, xfilter_utils_get_home_dir());
|
|
| 120 |
dbpath = xfilter_utils_get_default_base_dir();
|
|
| 123 | 121 |
xfilter_utils_set_base_dir(dbpath); |
| 124 | 122 |
|
| 125 | 123 |
if (xfilter_bayes_db_init(dbpath) < 0) {
|
| ... | ... | |
| 367 | 365 |
printf(" 2 uncertain\n");
|
| 368 | 366 |
printf(" 127 other errors\n");
|
| 369 | 367 |
printf("\n");
|
| 370 |
printf("Database will be created at ~/.sylfilter/*.db\n");
|
|
| 368 |
printf("Database will be created at %s/*.db\n",
|
|
| 369 |
xfilter_utils_get_default_base_dir()); |
|
| 371 | 370 |
printf("\n");
|
| 372 | 371 |
printf("Available key-value stores:\n");
|
| 373 | 372 |
#ifdef USE_QDBM |
Also available in: Unified diff