gpg,w32: Handle forward slash in --keyring option.

* g10/keydb.c (keydb_add_resource): Allow forward slash under Windows.
--

GnuPG-bug-id: 1546
This commit is contained in:
Werner Koch 2015-03-24 13:30:57 +01:00
parent 898c5c4836
commit bdd22e3a08
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
1 changed files with 10 additions and 2 deletions

View File

@ -369,10 +369,18 @@ keydb_add_resource (const char *url, unsigned int flags)
}
#endif /* !HAVE_DRIVE_LETTERS && !__riscos__ */
if (*resname != DIRSEP_C )
if (*resname != DIRSEP_C
#ifdef HAVE_W32_SYSTEM
&& *resname != '/' /* Fixme: does not handle drive letters. */
#endif
)
{
/* Do tilde expansion etc. */
if (strchr(resname, DIRSEP_C) )
if (strchr (resname, DIRSEP_C)
#ifdef HAVE_W32_SYSTEM
|| strchr (resname, '/') /* Windows also accepts this. */
#endif
)
filename = make_filename (resname, NULL);
else
filename = make_filename (opt.homedir, resname, NULL);