diff options
author | Yousong Zhou <yszhou4tech@gmail.com> | 2015-04-01 20:44:23 +0800 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-04-03 20:42:14 +0200 |
commit | 13d32e6df1c3949459c8821b7a03ec13d92e9bf1 (patch) | |
tree | e527e44e90ad005de5c039ee22515bf1e6be4fc0 | |
parent | c24ff81c286698bf0cb4b80ba522b3ab7ee85de9 (diff) | |
download | uci-13d32e6df1c3949459c8821b7a03ec13d92e9bf1.tar.gz |
delta: fix adding new savedir.
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>
-rw-r--r-- | delta.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -114,9 +114,8 @@ int uci_set_savedir(struct uci_context *ctx, const char *dir) } } 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) |