Replace file writes with new helper

This commit is contained in:
Pengfei
2021-07-06 16:42:22 +08:00
parent c81db424bb
commit cb6d58b538
3 changed files with 4 additions and 30 deletions
+1 -12
View File
@@ -293,18 +293,7 @@ bool SDMCImporter::ImportSystemArchive(u64 id,
return false;
}
FileUtil::IOFile target(target_path, "wb");
if (!target) {
LOG_ERROR(Core, "Could not open {}", target_path);
return false;
}
if (target.WriteBytes(romfs.data(), romfs.size()) != romfs.size()) {
LOG_ERROR(Core, "Failed to write to {}", target_path);
return false;
}
return true;
return FileUtil::WriteBytesToFile(target_path, romfs.data(), romfs.size());
}
bool SDMCImporter::ImportSysdata(u64 id,