From 1a48ddc4691eb937f3cd6b394c17ece173b3a80f Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 3 Nov 2023 17:52:08 +0600 Subject: [PATCH] Fixed saving error --- source/ubl-utils.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/ubl-utils.c b/source/ubl-utils.c index d0fb901..c7b87c4 100644 --- a/source/ubl-utils.c +++ b/source/ubl-utils.c @@ -1363,13 +1363,11 @@ int yon_config_save_registered(char *path){ if (sections_add) for_dictionaries(dct,sections_add){ char *command = yon_dictionary_get_data(dct,char*); - printf("%s\n",command); yon_launch(command); } if (sections_remove) for_dictionaries(dct,sections_remove){ char *command = yon_dictionary_get_data(dct,char*); - printf("%s\n",command); yon_launch(command); } return 1; @@ -1392,7 +1390,7 @@ int yon_config_force_save_registered(char *path){ if (dct->data&&strcmp(yon_dictionary_get_data(dct,char*),"")!=0){ if (((yon_config_parameter*)dct)->flag1==1||((yon_config_parameter*)dct)->flag1==0){ if (sections_add&&yon_dictionary_get(§ions_add,((yon_config_parameter*)dct)->section)) sections_add->data=(void*)yon_char_unite(yon_dictionary_get_data(sections_add,char*)," ",dct->key,"=",yon_dictionary_get_data(dct,char*),NULL); - else yon_dictionary_add_or_create_if_exists_with_data(sections_add,((yon_config_parameter*)dct)->section,yon_char_unite (ubconfig_save_command,path ? yon_char_append(" --target ",path):"", " set ", ((yon_config_parameter*)dct)->section, " ",dct->key,"=",yon_dictionary_get_data(dct,char*),NULL)); + else yon_dictionary_add_or_create_if_exists_with_data(sections_add,((yon_config_parameter*)dct)->section,yon_char_unite (ubconfig_save_command,path ? yon_char_append(" --target ",path):"", " set ", ((yon_config_parameter*)dct)->section, " ",dct->key,"=\"",yon_dictionary_get_data(dct,char*),"\"",NULL)); } else if (((yon_config_parameter*)dct)->flag1==-1){ if (sections_remove&&yon_dictionary_get(§ions_remove,((yon_config_parameter*)dct)->section)) sections_remove->data=(void*)yon_char_unite(yon_dictionary_get_data(sections_remove,char*)," ",dct->key,NULL); else yon_dictionary_add_or_create_if_exists_with_data(sections_remove,((yon_config_parameter*)dct)->section,yon_char_unite (ubconfig_save_command,path ? yon_char_append(" --target ",path):"", " remove ", ((yon_config_parameter*)dct)->section, " ",dct->key,NULL));