aboutsummaryrefslogtreecommitdiffstats
path: root/common/mkdir_p.c
diff options
context:
space:
mode:
authorNeal H. Walfield <[email protected]>2015-10-20 10:10:03 +0000
committerNeal H. Walfield <[email protected]>2015-10-20 10:17:46 +0000
commitc3bb9fccb7963a0918b9ec6a4f10d568fac7c125 (patch)
tree46d0cfbec59a6578ca6df55c383a62452f22c080 /common/mkdir_p.c
parentgpg: Remove unused prototype digest_algo_from_sig. (diff)
downloadgnupg-c3bb9fccb7963a0918b9ec6a4f10d568fac7c125.tar.gz
gnupg-c3bb9fccb7963a0918b9ec6a4f10d568fac7c125.zip
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 <[email protected]>
Diffstat (limited to 'common/mkdir_p.c')
-rw-r--r--common/mkdir_p.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/mkdir_p.c b/common/mkdir_p.c
index 2e93d6592..37b44ec14 100644
--- a/common/mkdir_p.c
+++ b/common/mkdir_p.c
@@ -60,7 +60,7 @@ gnupg_amkdir_p (const char **directory_components)
for (i = 0; directory_components[i]; i ++)
{
if (i == 0)
- dirs[i] = xtrystrdup (directory_components[i]);
+ dirs[i] = make_filename_try (directory_components[i], NULL);
else
dirs[i] = make_filename_try (dirs[i-1], directory_components[i], NULL);
if (!dirs[i])