Skip to content

Commit 28ad5de

Browse files
authored
Merge pull request #1883 from nicolasnoble/psyqo-iso9660-fixes
Fixing psyqo's multi-sector direntry parser.
2 parents ee6ca98 + fbe5ffc commit 28ad5de

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/mips/psyqo/src/iso9660-parser.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,6 @@ void psyqo::ISO9660Parser::findDirEntry() {
171171
}
172172

173173
auto name = m_path.substr(0, pos);
174-
m_path.remove_prefix(pos);
175-
if ((m_path.length() > 0) && (m_path[0] == '/')) {
176-
m_path.remove_prefix(1);
177-
}
178174

179175
if (m_cachedEntry.type == DirEntry::INVALID) {
180176
m_cachedPath.clear();
@@ -214,6 +210,7 @@ void psyqo::ISO9660Parser::findDirEntry() {
214210
return;
215211
} else {
216212
if ((entry[25] & 2) == 0) {
213+
parseDirEntry(entry, m_dirEntry);
217214
auto callback = eastl::move(m_callback);
218215
m_callback = nullptr;
219216
callback(true);
@@ -223,6 +220,10 @@ void psyqo::ISO9660Parser::findDirEntry() {
223220
parseDirEntry(entry, &m_cachedEntry);
224221
m_cachedPath.append(name.data(), name.length());
225222
m_cachedLBA = 0;
223+
m_path.remove_prefix(pos);
224+
if ((m_path.length() > 0) && (m_path[0] == '/')) {
225+
m_path.remove_prefix(1);
226+
}
226227
m_cdrom->readSectors(m_cachedEntry.LBA, 1, m_buffer, [this](bool success) {
227228
if (!success) {
228229
auto callback = eastl::move(m_callback);

0 commit comments

Comments
 (0)