mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-25 08:14:45 +02:00
ISO file system: Clean out version numbers from filenames.
Followup to #21599
This commit is contained in:
@@ -138,6 +138,15 @@ struct VolDescriptor {
|
||||
char zeroos[653];
|
||||
};
|
||||
|
||||
// Removes version numbers from filenames.
|
||||
static std::string_view CleanISOFileName(std::string_view name) {
|
||||
auto pos = name.find(';');
|
||||
if (pos != name.npos) {
|
||||
name = name.substr(0, pos);
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
ISOFileSystem::ISOFileSystem(IHandleAllocator *_hAlloc, std::shared_ptr<BlockDevice> _blockDevice) {
|
||||
@@ -223,7 +232,7 @@ void ISOFileSystem::ReadDirectory(TreeEntry *root) const {
|
||||
entry->name = "..";
|
||||
relative = true;
|
||||
} else {
|
||||
entry->name = std::string((const char *)&dir.firstIdChar, dir.identifierLength);
|
||||
entry->name = std::string(CleanISOFileName(std::string_view((const char *)&dir.firstIdChar, dir.identifierLength)));
|
||||
relative = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user