add import merging functionality, fix error handling in uci_import
[project/uci.git] / list.c
diff --git a/list.c b/list.c
index ae7fce841695056895152e845fa2fe64095806ee..4ff4f7b342bf340c9c5eb82b8d1a3f2d2a6ee779 100644 (file)
--- a/list.c
+++ b/list.c
@@ -455,6 +455,8 @@ int uci_set(struct uci_context *ctx, struct uci_package *p, char *section, char
                if (!e)
                        goto notfound;
                o = uci_to_option(e);
+       } else if (internal && ctx->pctx) {
+               ctx->pctx->section = s;
        }
 
        /*