| 93 | } |
| 94 | |
| 95 | static bool CleanUpAfterFailedWrite(const std::string& path) { |
| 96 | // Something went wrong. Let's not leave a corrupt file lying around. |
| 97 | int saved_errno = errno; |
| 98 | unlink(path.c_str()); |
| 99 | errno = saved_errno; |
| 100 | return false; |
| 101 | } |
| 102 | |
| 103 | #if !defined(_WIN32) |
| 104 | bool WriteStringToFile(const std::string& content, const std::string& path, |
no test coverage detected