diff options
author | Feng Xiao <xiaofeng@xiaofeng-macbookpro2.roam.corp.google.com> | 2014-11-07 14:09:18 -0500 |
---|---|---|
committer | Feng Xiao <xiaofeng@xiaofeng-macbookpro2.roam.corp.google.com> | 2014-11-08 02:40:18 -0500 |
commit | baca1a8a1aa180c42de6278d3b8286c4496c6a10 (patch) | |
tree | 5c5375f6832f92054c4a8fcbc39be0ddea93eac8 /src/google/protobuf/testing | |
parent | ad7f41bd574108e96c87510701e7653b78bd2729 (diff) |
Adds more checks before deleting temporary files.
Diffstat (limited to 'src/google/protobuf/testing')
-rw-r--r-- | src/google/protobuf/testing/file.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/google/protobuf/testing/file.cc b/src/google/protobuf/testing/file.cc index 20e01a15..5344ec15 100644 --- a/src/google/protobuf/testing/file.cc +++ b/src/google/protobuf/testing/file.cc @@ -133,6 +133,8 @@ bool File::RecursivelyCreateDir(const string& path, int mode) { void File::DeleteRecursively(const string& name, void* dummy1, void* dummy2) { + if (name.empty()) return; + // We don't care too much about error checking here since this is only used // in tests to delete temporary directories that are under /tmp anyway. |