Browse Source

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

master
jang1lee 8 hours ago
committed by GitHub
parent
commit
f7f6e1158e
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

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

Loading…
Cancel
Save