mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
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:
parent
898c5c4836
commit
bdd22e3a08
12
g10/keydb.c
12
g10/keydb.c
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user