From: Felix Fietkau Date: Tue, 12 Feb 2008 21:01:50 +0000 (+0100) Subject: fix a bug that prevented modifying empty config files X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=1c7d6f776662b9ca383d056e6552ba00af8935e9;p=uci.git fix a bug that prevented modifying empty config files --- 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)