COMMON: Add "getPathSeparator" to Archive and return ":" for Mac archive formats

This commit is contained in:
elasota 2023-05-29 16:15:54 -04:00 committed by Filippos Karapetis
parent 7be3c8f602
commit e53d2ec594
4 changed files with 28 additions and 4 deletions

View file

@ -94,6 +94,7 @@ public:
int listMembers(Common::ArchiveMemberList &list) const override;
const Common::ArchiveMemberPtr getMember(const Common::Path &path) const override;
Common::SeekableReadStream *createReadStreamForMember(const Common::Path &path) const override;
char getPathSeparator() const override;
private:
bool getFileDescIndex(const Common::Path &path, uint &outIndex, ArchiveMember::SubstreamType &outSubstreamType) const;
@ -390,6 +391,10 @@ Common::SeekableReadStream *MacVISEArchive::createReadStreamForMember(const Comm
return archiveMember->createReadStream();
}
char MacVISEArchive::getPathSeparator() const {
return ':';
}
bool MacVISEArchive::getFileDescIndex(const Common::Path &path, uint &outIndex, ArchiveMember::SubstreamType &outSubstreamType) const {
Common::String convertedPath = path.toString(':');
ArchiveMember::SubstreamType substreamType = ArchiveMember::kSubstreamTypeData;