client session CHANGE always store client schemas into set dir
diff --git a/src/session_client.c b/src/session_client.c
index e15f20f..f79182b 100644
--- a/src/session_client.c
+++ b/src/session_client.c
@@ -322,7 +322,6 @@
char *model_data = NULL;
uint64_t msgid;
char *filename = NULL;
- const char * const *searchdirs;
FILE *output;
if (submod_name) {
@@ -407,9 +406,8 @@
*format = LYS_IN_YANG;
/* try to store the model_data into local schema repository */
- if (model_data) {
- searchdirs = ly_ctx_get_searchdirs(session->ctx);
- if (asprintf(&filename, "%s/%s%s%s.yang", searchdirs ? searchdirs[0] : ".", mod_name,
+ if (model_data && client_opts.schema_searchpath) {
+ if (asprintf(&filename, "%s/%s%s%s.yang", client_opts.schema_searchpath, mod_name,
mod_rev ? "@" : "", mod_rev ? mod_rev : "") == -1) {
ERRMEM;
} else {