aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFQHSLycopene <110231817+FQHSLycopene@users.noreply.github.com>2025-05-29 17:38:12 +0800
committerGitHub <noreply@github.com>2025-05-29 02:38:12 -0700
commitee0c14673d61be9346a04c6e9ccbbbd6d03a6d9d (patch)
tree4f696f284a4c466516b3cd105c77a82293cdf3a0
parent9ffc8bcb54b4cbed9cccf21476a02c77b975d5e8 (diff)
downloadseaweedfs-ee0c14673d61be9346a04c6e9ccbbbd6d03a6d9d.tar.xz
seaweedfs-ee0c14673d61be9346a04c6e9ccbbbd6d03a6d9d.zip
Fix TTL Behavior for Directories in Path-Specific Configuration (#6827)
-rw-r--r--weed/filer/filer.go4
1 files changed, 4 insertions, 0 deletions
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)
/*