diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-11-21 09:50:53 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-11-21 09:50:53 +0200 |
commit | 5e58eeb2d7d0fa301785e5299b3f92da9aa64dc2 (patch) | |
tree | 7f640b86c109264be6a7287b52aeeb7e8e5949e3 /rpmio/rpmfileutil.c | |
parent | 19c5eb1ed89a103f9b16e04bf9adbf2f747d6146 (diff) | |
download | rpm-5e58eeb2d7d0fa301785e5299b3f92da9aa64dc2.tar.gz |
Permit relative paths in rpmioMkpath() and rpmMkdirs()
Diffstat (limited to 'rpmio/rpmfileutil.c')
-rw-r--r-- | rpmio/rpmfileutil.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rpmio/rpmfileutil.c b/rpmio/rpmfileutil.c index f4aed4ab2..5d2220e5b 100644 --- a/rpmio/rpmfileutil.c +++ b/rpmio/rpmfileutil.c @@ -282,7 +282,7 @@ int rpmioMkpath(const char * path, mode_t mode, uid_t uid, gid_t gid) char *d, *de; int rc; - if (path == NULL || path[0] != '/') + if (path == NULL) return -1; d = rstrcat(NULL, path); if (d[strlen(d)-1] != '/') { @@ -711,7 +711,7 @@ int rpmMkdirs(const char *root, const char *pathstr) argvSplit(&dirs, pathstr, ":"); for (char **d = dirs; *d; d++) { - char *path = rpmGetPath(root ? root : "", "/", *d, NULL); + char *path = rpmGetPath(root ? root : "", *d, NULL); if ((rc = rpmioMkpath(path, 0755, -1, -1)) != 0) { const char *msg = _("failed to create directory"); /* try to be more informative if the failing part was a macro */ |