mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-24 15:01:16 +01:00
Merge pull request #10995 from JosJuice/nfs-size-out
DiscIO: Fix calculation of NFS raw size
This commit is contained in:
commit
fef8325ff7
@ -76,7 +76,7 @@ std::vector<File::IOFile> NFSFileReader::OpenFiles(const std::string& directory,
|
|||||||
std::vector<File::IOFile> files;
|
std::vector<File::IOFile> files;
|
||||||
files.reserve(file_count);
|
files.reserve(file_count);
|
||||||
|
|
||||||
u64 raw_size = first_file.GetSize();
|
*raw_size_out = first_file.GetSize();
|
||||||
files.emplace_back(std::move(first_file));
|
files.emplace_back(std::move(first_file));
|
||||||
|
|
||||||
for (u64 i = 1; i < file_count; ++i)
|
for (u64 i = 1; i < file_count; ++i)
|
||||||
@ -89,16 +89,16 @@ std::vector<File::IOFile> NFSFileReader::OpenFiles(const std::string& directory,
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
raw_size += child.GetSize();
|
*raw_size_out += child.GetSize();
|
||||||
files.emplace_back(std::move(child));
|
files.emplace_back(std::move(child));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (raw_size < expected_raw_size)
|
if (*raw_size_out < expected_raw_size)
|
||||||
{
|
{
|
||||||
ERROR_LOG_FMT(
|
ERROR_LOG_FMT(
|
||||||
DISCIO,
|
DISCIO,
|
||||||
"Expected sum of NFS file sizes for {} to be at least {} bytes, but it was {} bytes",
|
"Expected sum of NFS file sizes for {} to be at least {} bytes, but it was {} bytes",
|
||||||
directory, expected_raw_size, raw_size);
|
directory, expected_raw_size, *raw_size_out);
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user