UCI_THROW(ctx, UCI_ERR_IO);
/* open the config file for writing now, so that it is locked */
- f1 = uci_open_stream(ctx, p->path, SEEK_SET, true, true);
+ f1 = uci_open_stream(ctx, p->path, NULL, SEEK_SET, true, true);
/* flush unsaved changes and reload from delta file */
UCI_TRAP_SAVE(ctx, done);
goto done;
}
- f2 = uci_open_stream(ctx, filename, SEEK_SET, true, true);
+ f2 = uci_open_stream(ctx, filename, p->path, SEEK_SET, true, true);
uci_export(ctx, f2, p, false);
fflush(f2);
}
UCI_TRAP_SAVE(ctx, done);
- file = uci_open_stream(ctx, filename, SEEK_SET, false, false);
+ file = uci_open_stream(ctx, filename, NULL, SEEK_SET, false, false);
ctx->err = 0;
UCI_INTERNAL(uci_import, ctx, file, name, &package, true);
UCI_TRAP_RESTORE(ctx);