mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
IOS/ESFormats: Fix content map writing
On Windows, this would fail because the file handle wasn't closed.
This commit is contained in:
parent
8865208571
commit
a370ad5f6d
@ -533,10 +533,12 @@ bool SharedContentMap::WriteEntries() const
|
||||
File::CreateFullPath(temp_path);
|
||||
|
||||
// Atomically write the new content map.
|
||||
File::IOFile file(temp_path, "w+b");
|
||||
if (!file.WriteArray(m_entries.data(), m_entries.size()))
|
||||
return false;
|
||||
File::CreateFullPath(m_file_path);
|
||||
{
|
||||
File::IOFile file(temp_path, "w+b");
|
||||
if (!file.WriteArray(m_entries.data(), m_entries.size()))
|
||||
return false;
|
||||
File::CreateFullPath(m_file_path);
|
||||
}
|
||||
return File::RenameSync(temp_path, m_file_path);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user