UCI_HANDLE_ERR(ctx);
/* make sure no memory from previous parse attempts is leaked */
- ctx->internal = true;
uci_cleanup(ctx);
uci_alloc_parse_context(ctx);
/* flush unsaved changes and reload from history file */
UCI_TRAP_SAVE(ctx, done);
- if (p->confdir) {
+ if (p->has_history) {
if (!overwrite) {
name = uci_strdup(ctx, p->e.name);
path = uci_strdup(ctx, p->path);
UCI_INTERNAL(uci_import, ctx, f, name, &p, true);
p->path = path;
- p->confdir = true;
+ p->has_history = true;
*package = p;
/* freed together with the uci_package */
if (package) {
package->path = filename;
- package->confdir = confdir;
+ package->has_history = confdir;
uci_load_history(ctx, package, false);
}