diff options
author | 2020-10-14 04:16:19 +1100 | |
---|---|---|
committer | 2020-10-14 04:16:19 +1100 | |
commit | 5822f5918df9bcb29633427ab170278dfc80ed0f (patch) | |
tree | b604ff9ae628e90d73a3de9d85b756352ed7821c /src/emu/fileio.cpp | |
parent | f5dd43c7338c3e7b5a5c1f8250ae926fbc34de34 (diff) |
emu/fileio.cpp: Fix an issue reporting the full path of files found in archives that was breaking artwork.
Diffstat (limited to 'src/emu/fileio.cpp')
-rw-r--r-- | src/emu/fileio.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/emu/fileio.cpp b/src/emu/fileio.cpp index 2233586fe6b..2a2682874c4 100644 --- a/src/emu/fileio.cpp +++ b/src/emu/fileio.cpp @@ -762,16 +762,21 @@ osd_file::error emu_file::attempt_zipped() int header = -1; // see if we can find a file with the right name and (if available) CRC - if (m_openflags & OPEN_FLAG_HAS_CRC) header = zip->search(m_crc, filename, false); - if (header < 0 && (m_openflags & OPEN_FLAG_HAS_CRC)) header = zip->search(m_crc, filename, true); + if (m_openflags & OPEN_FLAG_HAS_CRC) + header = zip->search(m_crc, filename, false); + if (header < 0 && (m_openflags & OPEN_FLAG_HAS_CRC)) + header = zip->search(m_crc, filename, true); // if that failed, look for a file with the right CRC, but the wrong filename - if (header < 0 && (m_openflags & OPEN_FLAG_HAS_CRC)) header = zip->search(m_crc); + if (header < 0 && (m_openflags & OPEN_FLAG_HAS_CRC)) + header = zip->search(m_crc); // if that failed, look for a file with the right name; // reporting a bad checksum is more helpful and less confusing than reporting "ROM not found" - if (header < 0) header = zip->search(filename, false); - if (header < 0) header = zip->search(filename, true); + if (header < 0) + header = zip->search(filename, false); + if (header < 0) + header = zip->search(filename, true); // if we got it, read the data if (header >= 0) @@ -782,6 +787,7 @@ osd_file::error emu_file::attempt_zipped() // build a hash with just the CRC m_hashes.reset(); m_hashes.add_crc(m_zipfile->current_crc()); + m_fullpath = savepath; return (m_openflags & OPEN_FLAG_NO_PRELOAD) ? osd_file::error::NONE : load_zipped_file(); } |