- // Don't assert that this is successful. The file could have
- // been removed by another process.
- unlink(name_.c_str());
+ if (!keep_)
+ {
+ // Don't assert that this is successful. The file could have
+ // been removed by another process.
+ unlink(name_.c_str());
+ }