From c8c35799cce5becc4073301326b45b80f97df594 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Wed, 13 Aug 2025 17:51:57 +0600 Subject: [PATCH] Access for file check --- source/ubl-settings-video.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/ubl-settings-video.c b/source/ubl-settings-video.c index 322eb0e..7de93b8 100644 --- a/source/ubl-settings-video.c +++ b/source/ubl-settings-video.c @@ -250,6 +250,11 @@ void yon_load_proceed(YON_CONFIG_TYPE type){ char *path = NULL; path=yon_custom_config_init(GTK_FILE_CHOOSER_ACTION_OPEN); if (!yon_char_is_empty(path)){ + if ((access(path,0)==F_OK&&access(path,4)!=F_OK)){ + if (yon_status_box_is_set()){ + yon_ubl_status_box_render(ACCESS_DENIED_LABEL(path),BACKGROUND_IMAGE_FAIL_TYPE); + } + } yon_config_clean(); yon_config_load_config(type,config_get_command(path),NULL); yon_ubl_status_box_render(yon_char_get_localised_from_lib(LOCAL_LOAD_SUCCESS_LABEL),BACKGROUND_IMAGE_SUCCESS_TYPE);