more error handling for internal uci_import calls
[project/uci.git] / list.c
diff --git a/list.c b/list.c
index ae7fce8..4ff4f7b 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;
        }
 
        /*