Fixes files with TTL are not listed in a mounted folder. (#6621)

This commit is contained in:
jang1lee
2025-03-12 22:07:41 +09:00
committed by GitHub
parent 5e43af8a91
commit f7f6e1158e

View File

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