From 7a242ae64b7f5abfd34a34a8e1ff992f34bb8fb6 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Thu, 10 Oct 2024 14:18:37 +0600 Subject: [PATCH] Fixed crash while application first startup --- source/ubl-utils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/ubl-utils.c b/source/ubl-utils.c index 390e453..27002d6 100644 --- a/source/ubl-utils.c +++ b/source/ubl-utils.c @@ -1303,6 +1303,9 @@ int yon_file_create(char *path, char *name, int rules){ int yon_file_create_full_path(char *path, int rules){ if (path){ if (access(path,F_OK)){ + char *cur_path = yon_char_new(path); + cur_path = yon_char_divide(cur_path,yon_char_find_last(cur_path,'/')); + mkdir(cur_path,0777); FILE *fl = fopen(path,"w"); if (fl){ chmod(path,rules);