Lines Matching refs:temp_name
266 std::string temp_name = path.AddExtension(random_suffix).value(); in WriteToFileAtomic() local
268 HANDLE_EINTR(open(temp_name.c_str(), O_CREAT | O_EXCL | O_WRONLY, mode)); in WriteToFileAtomic()
270 PLOG(WARNING) << "Could not open " << temp_name << " for atomic write"; in WriteToFileAtomic()
271 unlink(temp_name.c_str()); in WriteToFileAtomic()
280 PLOG(WARNING) << "Could not write " << temp_name; in WriteToFileAtomic()
282 unlink(temp_name.c_str()); in WriteToFileAtomic()
289 PLOG(WARNING) << "Could not fsync " << temp_name; in WriteToFileAtomic()
291 unlink(temp_name.c_str()); in WriteToFileAtomic()
295 PLOG(WARNING) << "Could not close " << temp_name; in WriteToFileAtomic()
296 unlink(temp_name.c_str()); in WriteToFileAtomic()
300 if (rename(temp_name.c_str(), path.value().c_str()) < 0) { in WriteToFileAtomic()
301 PLOG(WARNING) << "Could not close " << temp_name; in WriteToFileAtomic()
302 unlink(temp_name.c_str()); in WriteToFileAtomic()