From f7f6e1158e62ba11ce3927efa3a47317bc856217 Mon Sep 17 00:00:00 2001 From: jang1lee Date: Wed, 12 Mar 2025 22:07:41 +0900 Subject: [PATCH] Fixes files with TTL are not listed in a mounted folder. (#6621) --- 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 8a571d9e6..803b88f6c 100644 --- a/weed/mount/meta_cache/meta_cache.go +++ b/weed/mount/meta_cache/meta_cache.go @@ -147,7 +147,7 @@ func (mc *MetaCache) ListDirectoryEntries(ctx context.Context, dirPath util.Full } _, err := mc.localStore.ListDirectoryEntries(ctx, dirPath, startFileName, includeStartFile, limit, func(entry *filer.Entry) bool { - 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 true } mc.mapIdFromFilerToLocal(entry)