+ /* Move dir to the end of ctx->delta_path */
+ uci_foreach_element_safe(&ctx->delta_path, tmp, e) {
+ if (!strcmp(e->name, dir)) {
+ exists = true;
+ uci_list_del(&e->list);
+ break;
+ }
+ }
+ if (!exists)
+ UCI_INTERNAL(uci_add_delta_path, ctx, dir);
+ else
+ uci_list_add(&ctx->delta_path, &e->list);
+