From baca1a8a1aa180c42de6278d3b8286c4496c6a10 Mon Sep 17 00:00:00 2001 From: Feng Xiao Date: Fri, 7 Nov 2014 14:09:18 -0500 Subject: Adds more checks before deleting temporary files. --- src/google/protobuf/testing/file.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/google/protobuf/testing') 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. -- cgit v1.2.3