avoid nil

fix https://github.com/chrislusf/seaweedfs/issues/988
This commit is contained in:
Chris Lu
2019-06-21 20:56:27 -07:00
parent 308102f023
commit a111f26fe6
2 changed files with 9 additions and 3 deletions

View File

@@ -78,7 +78,7 @@ func (f *Filer) deleteChunksIfNotNew(oldEntry, newEntry *Entry) {
for _, oldChunk := range oldEntry.Chunks {
found := false
for _, newChunk := range newEntry.Chunks {
if oldChunk.Fid.Equals(newChunk.Fid) {
if filer_pb.ChunkEquals(oldChunk, newChunk) {
found = true
break
}