diff --git a/custom/4coder_lists.cpp b/custom/4coder_lists.cpp index ab7593bf..1c3a5f13 100644 --- a/custom/4coder_lists.cpp +++ b/custom/4coder_lists.cpp @@ -397,7 +397,7 @@ get_file_name_from_user(Application_Links *app, Arena *arena, String_Const_u8 qu result.file_name_in_text_field = string_front_of_path(l_result.text_field); String_Const_u8 path = {}; - if (result.file_name_in_text_field.size == 0 && l_result.text_field.size > 0){ + if (!result.is_folder && result.file_name_in_text_field.size == 0 && l_result.text_field.size > 0){ result.file_name_in_text_field = string_front_folder_of_path(l_result.text_field); path = string_remove_front_folder_of_path(l_result.text_field); }