aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/compiler/csharp/csharp_helpers.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/compiler/csharp/csharp_helpers.h')
-rw-r--r--src/google/protobuf/compiler/csharp/csharp_helpers.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/google/protobuf/compiler/csharp/csharp_helpers.h b/src/google/protobuf/compiler/csharp/csharp_helpers.h
index 1d17af61..278e05f3 100644
--- a/src/google/protobuf/compiler/csharp/csharp_helpers.h
+++ b/src/google/protobuf/compiler/csharp/csharp_helpers.h
@@ -117,7 +117,10 @@ inline bool IsMapEntryMessage(const Descriptor* descriptor) {
inline bool IsDescriptorProto(const FileDescriptor* descriptor) {
// TODO: Do this better! (Currently this depends on a hack in generate_protos.sh to rename
// the file...)
- return descriptor->name() == "google/protobuf/descriptor_proto_file.proto";
+ // We need to be able to detect the "normal" name as well, for times that we're just
+ // depending on descriptor.proto instead of generating it.
+ return descriptor->name() == "google/protobuf/descriptor_proto_file.proto"
+ || descriptor->name() == "google/protobuf/descriptor.proto";
}
inline bool IsWrapperType(const FieldDescriptor* descriptor) {