From 4ad669b2aa791cc6e6741606c3bc0c8840fabf99 Mon Sep 17 00:00:00 2001 From: jang1lee <jang1lee@users.noreply.github.com> Date: Thu, 20 Mar 2025 15:11:41 +0900 Subject: [PATCH] Fixes files with TTL can not be read in a mounted folder (#6646) --- weed/mount/meta_cache/meta_cache.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/mount/meta_cache/meta_cache.go b/weed/mount/meta_cache/meta_cache.go index 803b88f6c..0f0b1de30 100644 --- a/weed/mount/meta_cache/meta_cache.go +++ b/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)