From 5f6598f9e91521c7932215debdbf0eac8607ad07 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Mon, 16 Mar 2020 21:03:21 +0100 Subject: StringUtil: Add PathToFileName function --- Source/Core/UICommon/GameFile.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'Source/Core/UICommon/GameFile.cpp') diff --git a/Source/Core/UICommon/GameFile.cpp b/Source/Core/UICommon/GameFile.cpp index 8499d270f4..cc64d9d3e9 100644 --- a/Source/Core/UICommon/GameFile.cpp +++ b/Source/Core/UICommon/GameFile.cpp @@ -97,11 +97,9 @@ GameFile::GameFile() = default; GameFile::GameFile(std::string path) : m_file_path(std::move(path)) { - { - std::string name, extension; - SplitPath(m_file_path, nullptr, &name, &extension); - m_file_name = name + extension; + m_file_name = PathToFileName(m_file_path); + { std::unique_ptr volume(DiscIO::CreateVolume(m_file_path)); if (volume != nullptr) { -- cgit v1.2.3