|
|
|
|
@ -1532,7 +1532,7 @@ config_str yon_config_get_selection_by_key(int *size, ...){
|
|
|
|
|
char *cur = yon_config_get_by_key(arg);
|
|
|
|
|
char *parameter_string=NULL;
|
|
|
|
|
if (!yon_char_is_empty(cur)){
|
|
|
|
|
parameter_string = yon_char_unite(arg,"=",cur,NULL);
|
|
|
|
|
parameter_string = yon_char_unite(arg,"='",cur,"'",NULL);
|
|
|
|
|
yon_char_parsed_add_or_create_if_exists(ret_data,size,parameter_string);
|
|
|
|
|
free(parameter_string);
|
|
|
|
|
}
|
|
|
|
|
@ -1553,7 +1553,7 @@ config_str yon_config_get_selection_by_key_no_ignored(int *size, ...){
|
|
|
|
|
char *cur = yon_config_get_by_key(arg);
|
|
|
|
|
char *parameter_string=NULL;
|
|
|
|
|
if (!yon_char_is_empty(cur)&&!yon_config_check_ignore(cur)){
|
|
|
|
|
parameter_string = yon_char_unite(arg,"=",cur,NULL);
|
|
|
|
|
parameter_string = yon_char_unite(arg,"='",cur,"'",NULL);
|
|
|
|
|
yon_char_parsed_add_or_create_if_exists(ret_data,size,parameter_string);
|
|
|
|
|
free(parameter_string);
|
|
|
|
|
}
|
|
|
|
|
@ -2227,6 +2227,7 @@ config_str yon_file_open(char *file_path, int *size){
|
|
|
|
|
|
|
|
|
|
int yon_file_save(char *file_path, char *text){
|
|
|
|
|
FILE *file = fopen(file_path,"w");
|
|
|
|
|
chmod(file_path,0777);
|
|
|
|
|
if (file){
|
|
|
|
|
fputs(text,file);
|
|
|
|
|
fclose(file);
|
|
|
|
|
@ -2240,6 +2241,7 @@ int yon_file_create(char *path, char *name, int rules){
|
|
|
|
|
char *full_path = yon_char_unite(path,"/",name,NULL);
|
|
|
|
|
if (access(full_path,F_OK)){
|
|
|
|
|
FILE *fl = fopen(full_path,"w");
|
|
|
|
|
chmod(full_path,0777);
|
|
|
|
|
if (fl){
|
|
|
|
|
chmod(full_path,rules);
|
|
|
|
|
fclose(fl);
|
|
|
|
|
@ -2259,6 +2261,7 @@ int yon_file_create_full_path(char *path, int rules){
|
|
|
|
|
if (path){
|
|
|
|
|
if (access(path,F_OK)){
|
|
|
|
|
FILE *fl = fopen(path,"w");
|
|
|
|
|
chmod(path,0777);
|
|
|
|
|
if (fl){
|
|
|
|
|
chmod(path,rules);
|
|
|
|
|
fclose(fl);
|
|
|
|
|
|