FileSystemGCWii: Don't add 0-size files to m_offset_file_info_cache
This is done in order to reduce the risk of files not being added due to them having the same end offset as another file.
This commit is contained in:
parent
b155c46aca
commit
f7032f8deb
|
@ -308,7 +308,11 @@ std::unique_ptr<FileInfo> FileSystemGCWii::FindFileInfo(u64 disc_offset) const
|
|||
{
|
||||
FileInfoGCWii file_info(m_root, i);
|
||||
if (!file_info.IsDirectory())
|
||||
m_offset_file_info_cache.emplace(file_info.GetOffset() + file_info.GetSize(), i);
|
||||
{
|
||||
const u32 size = file_info.GetSize();
|
||||
if (size != 0)
|
||||
m_offset_file_info_cache.emplace(file_info.GetOffset() + size, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue