diff options
author | 2019-05-30 10:50:22 +0200 | |
---|---|---|
committer | 2019-05-30 10:55:08 +0200 | |
commit | 6f159efc1ab01535a1857e93f9180b71d8016f75 (patch) | |
tree | 282517392b4dc1f1c93a033a0ce195e4e6d9f494 /qfile.c | |
parent | tests/qmanifest: TRAVIS_OS_NAME != $(uname) (diff) | |
download | portage-utils-6f159efc1ab01535a1857e93f9180b71d8016f75.tar.gz portage-utils-6f159efc1ab01535a1857e93f9180b71d8016f75.tar.bz2 portage-utils-6f159efc1ab01535a1857e93f9180b71d8016f75.zip |
qfile: fix regression introduced in 55ad84ae
inversion of assume_root_prefix lead to unusable qfile with ROOT
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'qfile.c')
-rw-r--r-- | qfile.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -137,7 +137,7 @@ static int qfile_cb(tree_pkg_ctx *pkg_ctx, void *priv) for (i = 0; i < args->length; i++) { if (base_names[i] == NULL) continue; - if (non_orphans && non_orphans[i]) + if (non_orphans != NULL && non_orphans[i]) continue; /* For optimization of qfile(), we also give it an array of @@ -316,7 +316,7 @@ prepare_qfile_args(const int argc, const char **argv, struct qfile_opt_state *st * "realpath(ROOT)" prefix) */ if (argv[i][0] == '/') { snprintf(abspath, sizeof(abspath), "%s%s", - state->assume_root_prefix ? real_root : "", argv[i]); + state->assume_root_prefix ? "" : real_root, argv[i]); } else if (pwd) { if (state->assume_root_prefix) snprintf(abspath, sizeof(abspath), "%s/%s", pwd, argv[i]); |