conf-files: add flag so that we don't always prefix returned paths with the root dir path used
This is useful in tools such as system-repart where we show the definition file paths a lot in our output, but if prefixed with the root path we'd show a temporary mount dir when operating on a image file. Hence, let's drop the prefix here, and show only the path within the image.
This commit is contained in:
@@ -539,7 +539,7 @@ static int copy_and_sort_files_from_hashmap(
|
||||
|
||||
if (FLAGS_SET(flags, CONF_FILES_BASENAME))
|
||||
add = c->filename;
|
||||
else if (root) {
|
||||
else if (root && !FLAGS_SET(flags, CONF_FILES_DONT_PREFIX_ROOT)) {
|
||||
_cleanup_free_ char *p = NULL;
|
||||
|
||||
r = chaseat_prefix_root(c->result, root, &p);
|
||||
|
||||
Reference in New Issue
Block a user