mirror of
https://github.com/holub/mame
synced 2025-04-22 08:22:15 +03:00
Fixed issue whereby the determination that one cannot create files in an archive was done once, and didn't change if the user changed directories
This commit is contained in:
parent
409d5e0d64
commit
9166e7eb97
@ -560,7 +560,7 @@ void menu_file_selector::populate()
|
||||
append_entry(SELECTOR_ENTRY_TYPE_EMPTY, "", "");
|
||||
}
|
||||
|
||||
if (m_has_create)
|
||||
if (m_has_create && !util::zippath_is_zip(directory))
|
||||
{
|
||||
// add the "[create]" entry
|
||||
append_entry(SELECTOR_ENTRY_TYPE_CREATE, "", "");
|
||||
|
@ -177,16 +177,8 @@ void menu_control_device_image::handle()
|
||||
{
|
||||
switch(state) {
|
||||
case START_FILE: {
|
||||
bool can_create = false;
|
||||
if(image->is_creatable()) {
|
||||
util::zippath_directory *directory = nullptr;
|
||||
osd_file::error err = util::zippath_opendir(current_directory.c_str(), &directory);
|
||||
can_create = err == osd_file::error::NONE && !util::zippath_is_zip(directory);
|
||||
if(directory)
|
||||
util::zippath_closedir(directory);
|
||||
}
|
||||
submenu_result = -1;
|
||||
menu::stack_push<menu_file_selector>(ui(), container, image, current_directory, current_file, true, image->image_interface()!=nullptr, can_create, &submenu_result);
|
||||
menu::stack_push<menu_file_selector>(ui(), container, image, current_directory, current_file, true, image->image_interface()!=nullptr, image->is_creatable(), &submenu_result);
|
||||
state = SELECT_FILE;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user