mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 04:08:55 +00:00
Filesystem: Replace file info's full path with name
Some callers (i.e. ISOProperties) don't want the full path, so giving them it is unnecessary. Those that do want it can use GetPathFromFSTOffset. Not storing full paths everywhere also saves a small bit of RAM and is necessary for a later commit. The code isn't especially pretty right now (callers need to use FST offsets...) but it'll become better later.
This commit is contained in:
parent
5021b4a567
commit
07d3a39aeb
6 changed files with 89 additions and 90 deletions
|
@ -221,9 +221,12 @@ bool DiscScrubber::ParsePartitionData(const Partition& partition, PartitionHeade
|
|||
MarkAsUsedE(partition_data_offset, header->fst_offset, header->fst_size);
|
||||
|
||||
// Go through the filesystem and mark entries as used
|
||||
for (const FileInfoGCWii& file : filesystem->GetFileList())
|
||||
auto& file_list = filesystem->GetFileList();
|
||||
for (size_t i = 0; i < file_list.size(); ++i)
|
||||
{
|
||||
DEBUG_LOG(DISCIO, "%s", file.m_FullPath.empty() ? "/" : file.m_FullPath.c_str());
|
||||
const std::string path = filesystem->GetPathFromFSTOffset(i);
|
||||
DEBUG_LOG(DISCIO, "%s", path.empty() ? "/" : path.c_str());
|
||||
auto& file = file_list[i];
|
||||
if (!file.IsDirectory())
|
||||
MarkAsUsedE(partition_data_offset, file.GetOffset(), file.GetSize());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue