File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -193,11 +193,13 @@ bool VersionEdit::EncodeTo(std::string* dst,
193
193
PutVarint64 (&varint_epoch_number, f.epoch_number );
194
194
PutLengthPrefixedSlice (dst, Slice (varint_epoch_number));
195
195
196
- PutVarint32 (dst, NewFileCustomTag::kFileChecksum );
197
- PutLengthPrefixedSlice (dst, Slice (f.file_checksum ));
196
+ if (f.file_checksum_func_name != kUnknownFileChecksumFuncName ) {
197
+ PutVarint32 (dst, NewFileCustomTag::kFileChecksum );
198
+ PutLengthPrefixedSlice (dst, Slice (f.file_checksum ));
198
199
199
- PutVarint32 (dst, NewFileCustomTag::kFileChecksumFuncName );
200
- PutLengthPrefixedSlice (dst, Slice (f.file_checksum_func_name ));
200
+ PutVarint32 (dst, NewFileCustomTag::kFileChecksumFuncName );
201
+ PutLengthPrefixedSlice (dst, Slice (f.file_checksum_func_name ));
202
+ }
201
203
202
204
if (f.fd .GetPathId () != 0 ) {
203
205
PutVarint32 (dst, NewFileCustomTag::kPathId );
You can’t perform that action at this time.
0 commit comments