소스 검색

Merge pull request #8409 from srago/protoc-fix

add error returns missing from protoc to prevent it from exiting with…
Adam Cozzette 4 년 전
부모
커밋
617e255617
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      src/google/protobuf/compiler/command_line_interface.cc

+ 2 - 0
src/google/protobuf/compiler/command_line_interface.cc

@@ -586,10 +586,12 @@ bool CommandLineInterface::GeneratorContextImpl::WriteAllToZip(
 
   if (stream.GetErrno() != 0) {
     std::cerr << filename << ": " << strerror(stream.GetErrno()) << std::endl;
+    return false;
   }
 
   if (!stream.Close()) {
     std::cerr << filename << ": " << strerror(stream.GetErrno()) << std::endl;
+    return false;
   }
 
   return true;