mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
common: Make sure tilde expansion works for the mkdir functions.
* common/mkdir_p.c (gnupg_amkdir_p): Use make_filename_try on the first directory component as well. -- If there is only a single directory component, then tilde expansion won't be done. Signed-off-by: Neal H. Walfield <neal@g10code.com>
This commit is contained in:
parent
d1a0b520b1
commit
c3bb9fccb7
1 changed files with 1 additions and 1 deletions
|
@ -60,7 +60,7 @@ gnupg_amkdir_p (const char **directory_components)
|
||||||
for (i = 0; directory_components[i]; i ++)
|
for (i = 0; directory_components[i]; i ++)
|
||||||
{
|
{
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
dirs[i] = xtrystrdup (directory_components[i]);
|
dirs[i] = make_filename_try (directory_components[i], NULL);
|
||||||
else
|
else
|
||||||
dirs[i] = make_filename_try (dirs[i-1], directory_components[i], NULL);
|
dirs[i] = make_filename_try (dirs[i-1], directory_components[i], NULL);
|
||||||
if (!dirs[i])
|
if (!dirs[i])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue