aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/compiler/importer_unittest.cc
diff options
context:
space:
mode:
authorFeng Xiao <xiaofeng@xiaofeng-macbookpro2.roam.corp.google.com>2014-11-07 14:09:18 -0500
committerFeng Xiao <xiaofeng@xiaofeng-macbookpro2.roam.corp.google.com>2014-11-08 02:40:18 -0500
commitbaca1a8a1aa180c42de6278d3b8286c4496c6a10 (patch)
tree5c5375f6832f92054c4a8fcbc39be0ddea93eac8 /src/google/protobuf/compiler/importer_unittest.cc
parentad7f41bd574108e96c87510701e7653b78bd2729 (diff)
downloadprotobuf-baca1a8a1aa180c42de6278d3b8286c4496c6a10.tar.gz
protobuf-baca1a8a1aa180c42de6278d3b8286c4496c6a10.tar.bz2
protobuf-baca1a8a1aa180c42de6278d3b8286c4496c6a10.zip
Adds more checks before deleting temporary files.
Diffstat (limited to 'src/google/protobuf/compiler/importer_unittest.cc')
-rw-r--r--src/google/protobuf/compiler/importer_unittest.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/google/protobuf/compiler/importer_unittest.cc b/src/google/protobuf/compiler/importer_unittest.cc
index 387f135d..8cc5d882 100644
--- a/src/google/protobuf/compiler/importer_unittest.cc
+++ b/src/google/protobuf/compiler/importer_unittest.cc
@@ -348,7 +348,9 @@ class DiskSourceTreeTest : public testing::Test {
virtual void TearDown() {
for (int i = 0; i < dirnames_.size(); i++) {
- File::DeleteRecursively(dirnames_[i], NULL, NULL);
+ if (File::Exists(dirnames_[i])) {
+ File::DeleteRecursively(dirnames_[i], NULL, NULL);
+ }
}
}