aboutsummaryrefslogtreecommitdiffstats
path: root/g10/tdbio.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/tdbio.c')
-rw-r--r--g10/tdbio.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/g10/tdbio.c b/g10/tdbio.c
index 0a659b141..db7a67c05 100644
--- a/g10/tdbio.c
+++ b/g10/tdbio.c
@@ -480,7 +480,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;
@@ -490,6 +490,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 GPGEXT_GPG, NULL);
else if (*new_dbname != DIRSEP_C )
@@ -515,7 +517,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;