From ee0c14673d61be9346a04c6e9ccbbbd6d03a6d9d Mon Sep 17 00:00:00 2001 From: FQHSLycopene <110231817+FQHSLycopene@users.noreply.github.com> Date: Thu, 29 May 2025 17:38:12 +0800 Subject: [PATCH] Fix TTL Behavior for Directories in Path-Specific Configuration (#6827) --- weed/filer/filer.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/weed/filer/filer.go b/weed/filer/filer.go index 829b4c4b4..6c61cfc3f 100644 --- a/weed/filer/filer.go +++ b/weed/filer/filer.go @@ -197,6 +197,10 @@ func (f *Filer) CreateEntry(ctx context.Context, entry *Entry, o_excl bool, isFr return fmt.Errorf("entry name too long") } + if entry.IsDirectory() { + entry.Attr.TtlSec = 0 + } + oldEntry, _ := f.FindEntry(ctx, entry.FullPath) /*