From 1c7d6f776662b9ca383d056e6552ba00af8935e9 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 12 Feb 2008 22:01:50 +0100 Subject: [PATCH] fix a bug that prevented modifying empty config files --- file.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/file.c b/file.c index d320ba6..740b1d5 100644 --- a/file.c +++ b/file.c @@ -330,6 +330,8 @@ error: } uci_fixup_section(ctx, ctx->pctx->section); + if (!pctx->package && name) + uci_switch_config(ctx); if (package) *package = pctx->package; if (pctx->merge) -- 2.11.0