summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/frontend/mame/ui/filecreate.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/frontend/mame/ui/filecreate.cpp b/src/frontend/mame/ui/filecreate.cpp
index e54692e600f..07f0abdf9c5 100644
--- a/src/frontend/mame/ui/filecreate.cpp
+++ b/src/frontend/mame/ui/filecreate.cpp
@@ -148,12 +148,9 @@ menu_file_create::menu_file_create(mame_ui_manager &mui, render_container &conta
{
m_image = image;
m_ok = true;
- auto const sep = current_file.rfind(PATH_SEPARATOR);
m_filename.reserve(1024);
- m_filename = sep != std::string::npos
- ? current_file.substr(sep + strlen(PATH_SEPARATOR), current_file.size() - sep - strlen(PATH_SEPARATOR))
- : current_file;
+ m_filename = core_filename_extract_base(current_file);
}