We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 19cafde commit ea9d6a3Copy full SHA for ea9d6a3
cyber/common/file.cc
@@ -111,6 +111,10 @@ bool GetProtoFromBinaryFile(const std::string &file_name,
111
112
bool GetProtoFromFile(const std::string &file_name,
113
google::protobuf::Message *message) {
114
+ if (!PathExists(file_name)) {
115
+ AERROR << "File does not exist! " << file_name;
116
+ return false;
117
+ }
118
// Try the binary parser first if it's much likely a binary proto.
119
static const std::string kBinExt = ".bin";
120
if (std::equal(kBinExt.rbegin(), kBinExt.rend(), file_name.rbegin())) {
0 commit comments