mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-23 10:29:58 +01:00
* tdbio.c (tdbio_set_dbname): Fix assertion failure with
non-fully-qualified trustdb names.
This commit is contained in:
parent
97e93b7e18
commit
d65d805aad
@ -1,3 +1,8 @@
|
||||
2003-01-12 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* tdbio.c (tdbio_set_dbname): Fix assertion failure with
|
||||
non-fully-qualified trustdb names.
|
||||
|
||||
2003-01-10 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* trustdb.h, trustdb.c (trust_letter): Make static.
|
||||
|
15
g10/tdbio.c
15
g10/tdbio.c
@ -450,9 +450,18 @@ tdbio_set_dbname( const char *new_dbname, int create )
|
||||
atexit( cleanup );
|
||||
initialized = 1;
|
||||
}
|
||||
fname = new_dbname? m_strdup( new_dbname )
|
||||
: make_filename(opt.homedir,
|
||||
"trustdb" EXTSEP_S "gpg", NULL );
|
||||
|
||||
if(new_dbname==NULL)
|
||||
fname=make_filename(opt.homedir,"trustdb" EXTSEP_S "gpg", NULL);
|
||||
else if (*new_dbname != DIRSEP_C )
|
||||
{
|
||||
if (strchr(new_dbname, DIRSEP_C) )
|
||||
fname = make_filename (new_dbname, NULL);
|
||||
else
|
||||
fname = make_filename (opt.homedir, new_dbname, NULL);
|
||||
}
|
||||
else
|
||||
fname = m_strdup (new_dbname);
|
||||
|
||||
if( access( fname, R_OK ) ) {
|
||||
if( errno != ENOENT ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user