Browse Source

Fixes files with TTL can not be read in a mounted folder (#6646)

pull/6648/head
jang1lee 2 weeks ago
committed by GitHub
parent
commit
4ad669b2aa
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      weed/mount/meta_cache/meta_cache.go

2
weed/mount/meta_cache/meta_cache.go

@ -119,7 +119,7 @@ func (mc *MetaCache) FindEntry(ctx context.Context, fp util.FullPath) (entry *fi
if err != nil {
return nil, err
}
if entry.TtlSec > 0 && entry.Crtime.Add(time.Duration(entry.TtlSec)).Before(time.Now()) {
if entry.TtlSec > 0 && entry.Crtime.Add(time.Duration(entry.TtlSec)*time.Second).Before(time.Now()) {
return nil, filer_pb.ErrNotFound
}
mc.mapIdFromFilerToLocal(entry)

Loading…
Cancel
Save