mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-16 19:18:30 +02:00
Explicitly created directory markers (zero-byte S3 objects with keys ending in "/") should not be auto-deleted by the empty folder cleaner even when they have no children. These represent intentional directory structures created via PutObject. The distinction between implicit and explicit directories is: - Implicit dirs: created by filer as parents, Mime="" (IsOlderDir) - Explicit markers: created via PutObject, Mime set or ExtMimeType set Added isDirectoryMarker() check before deletion that looks for ExtMimeType in extended attributes (set only on zero-byte markers). Results are cached in folderState to avoid repeated store lookups. Uses fail-closed on transient errors but allows deletion on ErrNotFound (entry doesn't exist = implicit directory, not a marker).