diff --git a/Source/Core/DiscIO/NANDImporter.cpp b/Source/Core/DiscIO/NANDImporter.cpp index f4c94bbb2c..77492fd0f0 100644 --- a/Source/Core/DiscIO/NANDImporter.cpp +++ b/Source/Core/DiscIO/NANDImporter.cpp @@ -134,10 +134,6 @@ bool NANDImporter::ExtractFiles() std::string NANDImporter::GetPath(const NANDFSTEntry& entry, const std::string& parent_path) { std::string name(entry.name, strnlen(entry.name, sizeof(NANDFSTEntry::name))); - - if (name.front() == '/' || parent_path.back() == '/') - return parent_path + name; - return parent_path + '/' + name; } @@ -153,7 +149,7 @@ bool NANDImporter::ProcessEntry(u16 entry_number, const std::string& parent_path const NANDFSTEntry entry = m_superblock->fst[entry_number]; - const std::string path = GetPath(entry, parent_path); + const std::string path = entry_number == 0 ? parent_path : GetPath(entry, parent_path); INFO_LOG_FMT(DISCIO, "Entry: {} Path: {}", entry, path); Type type = static_cast(entry.mode & 3);