summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/api.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/api.c b/src/api.c
index 5d31c37..4a7185b 100644
--- a/src/api.c
+++ b/src/api.c
@@ -816,7 +816,13 @@ static char *cg_build_path_locked(char *name, char *path, char *type)
* XX: Change to snprintf once you figure what n should be
*/
if (strcmp(cg_mount_table[i].name, type) == 0) {
- sprintf(path, "%s/", cg_mount_table[i].path);
+ if (cg_namespace_table[i]) {
+ sprintf(path, "%s/%s/", cg_mount_table[i].path,
+ cg_namespace_table[i]);
+ } else {
+ sprintf(path, "%s/", cg_mount_table[i].path);
+ }
+
if (name) {
char *tmp;
tmp = strdup(path);