avoid possible nil case during other error cases

This commit is contained in:
chrislu 2024-07-01 00:54:37 -07:00
parent ac6fd36c06
commit 0fdf7eca48

View File

@ -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 {