ISO file system: Clean out version numbers from filenames.

Followup to #21599
This commit is contained in:
Henrik Rydgård
2026-04-27 12:36:58 +02:00
parent 79ead80f87
commit 935a50ac59
2 changed files with 11 additions and 1 deletions
+10 -1
View File
@@ -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;
}