From c6f7c2dcd82f1214a24a21e2b975020c2e848c81 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Wed, 27 Aug 2025 10:56:20 +0600 Subject: [PATCH] Fixed crash --- source/ubl-settings-repomanager-data-structs.c | 6 +++++- source/ubl-settings-repomanager-storage-window.c | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/source/ubl-settings-repomanager-data-structs.c b/source/ubl-settings-repomanager-data-structs.c index 5bd68d0..8b71619 100644 --- a/source/ubl-settings-repomanager-data-structs.c +++ b/source/ubl-settings-repomanager-data-structs.c @@ -38,7 +38,10 @@ void yon_repo_fill_archs(repo_struct *repo){ int size; config_str folders = yon_dir_get_contents(repo->path,&size); for (int i=0;ipath,"/",folders[i],NULL); + if (yon_file_is_directory(full_path)&& + (strcmp(folders[i],".")&& + strcmp(folders[i],".."))){ arch_struct *arch = yon_arch_struct_new(); arch->name = yon_char_new(folders[i]); arch->path = yon_char_unite(repo->path,"/",arch->name,NULL); @@ -47,6 +50,7 @@ void yon_repo_fill_archs(repo_struct *repo){ yon_arch_fill_packages(arch); g_hash_table_insert(repo->archs,arch->name,arch); } + free(full_path); } } diff --git a/source/ubl-settings-repomanager-storage-window.c b/source/ubl-settings-repomanager-storage-window.c index 50cbdfa..db8ddb0 100644 --- a/source/ubl-settings-repomanager-storage-window.c +++ b/source/ubl-settings-repomanager-storage-window.c @@ -53,12 +53,12 @@ void on_storage_open(GtkWidget *self, storage_config_window *window){ int exist_size=0; config_str exist_storages = (config_str)g_hash_table_get_keys_as_array(main_config.storages,&exist_size); for (int i=0;iStatusBox),INSIDE_STORAGE_ERROR_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); return; } } - yon_char_parsed_free(exist_storages,exist_size); storage_struct *storage = yon_storage_struct_new(); storage->path=dialog->last_success_selection; storage->name = yon_char_new(storage->path);