mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06: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:
@ -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());
|
||||
}
|
||||
|
Reference in New Issue
Block a user