Newly added savedir should be at the last position while
uci_add_delta_path() will add it to the position second to the last.
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
}
}
if (!exists)
- UCI_INTERNAL(uci_add_delta_path, ctx, dir);
- else
- uci_list_add(&ctx->delta_path, &e->list);
+ e = uci_alloc_generic(ctx, UCI_TYPE_PATH, dir, sizeof(struct uci_element));
+ uci_list_add(&ctx->delta_path, &e->list);
sdir = uci_strdup(ctx, dir);
if (ctx->savedir != uci_savedir)