~ubuntu-branches/ubuntu/oneiric/bogofilter/oneiric

« back to all changes in this revision

Viewing changes to src/paths.c

  • Committer: Bazaar Package Importer
  • Author(s): Tollef Fog Heen
  • Date: 2005-11-10 11:49:05 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20051110114905-s0dfdxew1kaonhyw
Tags: 0.96.5-1ubuntu1
* Resynchronise with Debian.
  - bogofilter-qdbm still disabled, bogofilter-tdb went away upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: paths.c,v 1.50 2005/06/29 23:52:50 relson Exp $ */
 
1
/* $Id: paths.c,v 1.51 2005/08/14 13:08:35 relson Exp $ */
2
2
 
3
3
/**
4
4
 * \file
165
165
    int rc;
166
166
    struct stat sb;
167
167
 
 
168
    bfp->isdir = bfp->isfile = false;
 
169
 
168
170
    rc = stat(bfp->filepath, &sb);
169
171
    if (rc == 0) {
170
172
        bfp->exists = true;
233
235
    bfpath_split(bfp, bogohome);
234
236
}
235
237
 
 
238
void bfpath_set_filename(bfpath *bfp, const char *filename)
 
239
{
 
240
    xfree(bfp->filename);
 
241
    bfp->filename = xstrdup(filename);
 
242
    xfree(bfp->filepath);
 
243
    bfp->filepath = mxcat(bfp->dirname, DIRSEP_S, bfp->filename, NULL);
 
244
    check_for_file(bfp);
 
245
    return;
 
246
}
 
247
 
236
248
bfpath *bfpath_free(bfpath *bfp)
237
249
{
238
250
    xfree(bfp->dirname);