diff options
author | Yabin Cui <yabinc@google.com> | 2018-03-08 17:03:04 -0800 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2018-03-08 17:59:36 -0800 |
commit | ef58cef98250305e6d629f3a307a74e45875b8dd (patch) | |
tree | 226c4221c6d349eca2e4ec158e8ce3d60d2f137a /base/test_utils.cpp | |
parent | 929112bcd19e92c9b9f647d8a227ba55c743239d (diff) |
base: Add TemporaryFile::DoNotRemove().
Bug: http://b/73127105
Test: none.
Change-Id: I563c12bfb629ddd630568dda4817fb10cc9940a8
Diffstat (limited to 'base/test_utils.cpp')
-rw-r--r-- | base/test_utils.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/base/test_utils.cpp b/base/test_utils.cpp index 9d8dfb2fd4..1619c21347 100644 --- a/base/test_utils.cpp +++ b/base/test_utils.cpp @@ -92,7 +92,9 @@ TemporaryFile::~TemporaryFile() { if (fd != -1) { close(fd); } - unlink(path); + if (remove_file_) { + unlink(path); + } } int TemporaryFile::release() { |