Browse Source

avoid possible nil case during other error cases

pull/5729/head
chrislu 6 months ago
parent
commit
0fdf7eca48
  1. 2
      weed/filer/filerstore_wrapper.go

2
weed/filer/filerstore_wrapper.go

@ -182,7 +182,7 @@ func (fsw *FilerStoreWrapper) DeleteEntry(ctx context.Context, fp util.FullPath)
}()
existingEntry, findErr := fsw.FindEntry(ctx, fp)
if findErr == filer_pb.ErrNotFound {
if findErr == filer_pb.ErrNotFound || existingEntry == nil {
return nil
}
if len(existingEntry.HardLinkId) != 0 {

Loading…
Cancel
Save