mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
Explicitly close the output stream.
PiperOrigin-RevId: 503904221 Change-Id: Iee1899d80190a314c9c83f0a69e5fac76494cd92
This commit is contained in:
parent
8c107936da
commit
93ef7eb380
|
@ -272,6 +272,7 @@ bool CopyFile(const std::string& old_path, const std::string& new_path,
|
|||
std::ofstream output(new_path,
|
||||
std::ios_base::trunc | std::ios_base::binary);
|
||||
output << input.rdbuf();
|
||||
output.close();
|
||||
if (!input || !output) {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user