Browse Source

empty vs no data

pull/7178/head
chrislu 2 weeks ago
parent
commit
976a6eb3d5
  1. 4
      weed/filer/foundationdb/foundationdb_store.go

4
weed/filer/foundationdb/foundationdb_store.go

@ -246,7 +246,7 @@ func (store *FoundationDBStore) FindEntry(ctx context.Context, fullpath util.Ful
return nil, fmt.Errorf("find entry %s: %w", fullpath, err) return nil, fmt.Errorf("find entry %s: %w", fullpath, err)
} }
if len(data) == 0 {
if data == nil {
return nil, filer_pb.ErrNotFound return nil, filer_pb.ErrNotFound
} }
@ -519,7 +519,7 @@ func (store *FoundationDBStore) KvGet(ctx context.Context, key []byte) ([]byte,
if err != nil { if err != nil {
return nil, fmt.Errorf("kv get %s: %w", string(key), err) return nil, fmt.Errorf("kv get %s: %w", string(key), err)
} }
if len(data) == 0 {
if data == nil {
return nil, filer.ErrKvNotFound return nil, filer.ErrKvNotFound
} }

Loading…
Cancel
Save