diff --git a/scripts/construct/build_pb.py b/scripts/construct/build_pb.py index b77500f..a85ef1b 100644 --- a/scripts/construct/build_pb.py +++ b/scripts/construct/build_pb.py @@ -36,7 +36,7 @@ def need_rebuild(pb_files): return True s1 = os.stat(proto_name + '.pb.cc') s2 = os.stat('../tools/protobuild/' + proto_name + '.proto') - if s1.st_mtime < s2.st_mtime: + if s1.st_size <= 0 or s1.st_mtime < s2.st_mtime: return True return False