diff options
Diffstat (limited to 'g10/tdbio.c')
-rw-r--r-- | g10/tdbio.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/g10/tdbio.c b/g10/tdbio.c index 3e6091c1a..c5f662cff 100644 --- a/g10/tdbio.c +++ b/g10/tdbio.c @@ -473,7 +473,7 @@ create_version_record (void) int -tdbio_set_dbname( const char *new_dbname, int create ) +tdbio_set_dbname( const char *new_dbname, int create, int *r_nofile) { char *fname; static int initialized = 0; @@ -483,6 +483,8 @@ tdbio_set_dbname( const char *new_dbname, int create ) initialized = 1; } + *r_nofile = 0; + if(new_dbname==NULL) fname=make_filename(opt.homedir,"trustdb" EXTSEP_S "gpg", NULL); else if (*new_dbname != DIRSEP_C ) @@ -501,7 +503,9 @@ tdbio_set_dbname( const char *new_dbname, int create ) xfree(fname); return G10ERR_TRUSTDB; } - if( create ) { + if (!create) + *r_nofile = 1; + else { FILE *fp; TRUSTREC rec; int rc; |