From 428ef2b75f5d991201adf5cda7314fd567c0e461 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Tue, 10 Feb 2026 16:39:56 -0800 Subject: [PATCH] logging --- weed/filer/filer.go | 1 + weed/s3api/s3api_object_handlers_put.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/weed/filer/filer.go b/weed/filer/filer.go index 9f58d3f9d..0a135d915 100644 --- a/weed/filer/filer.go +++ b/weed/filer/filer.go @@ -309,6 +309,7 @@ func (f *Filer) ensureParentDirectoryEntry(ctx context.Context, entry *Entry, di dirEntry.Extended = map[string][]byte{ s3_constants.ExtS3ImplicitDir: []byte("true"), } + glog.InfofCtx(ctx, "ensureParentDirectoryEntry: implicit directory created %s", dirPath) } glog.V(2).InfofCtx(ctx, "create directory: %s %v", dirPath, dirEntry.Mode) diff --git a/weed/s3api/s3api_object_handlers_put.go b/weed/s3api/s3api_object_handlers_put.go index c5014864b..7903bd6a1 100644 --- a/weed/s3api/s3api_object_handlers_put.go +++ b/weed/s3api/s3api_object_handlers_put.go @@ -139,6 +139,8 @@ func (s3a *S3ApiServer) PutObjectHandler(w http.ResponseWriter, r *http.Request) fullDirPath = fullDirPath + "/" + dirName } + glog.Infof("PutObjectHandler: explicit directory marker %s/%s (contentType=%q, len=%d)", + bucket, object, objectContentType, r.ContentLength) if err := s3a.mkdir( fullDirPath, entryName, func(entry *filer_pb.Entry) { @@ -148,8 +150,6 @@ func (s3a *S3ApiServer) PutObjectHandler(w http.ResponseWriter, r *http.Request) if r.ContentLength > 0 { entry.Content, _ = io.ReadAll(r.Body) } - // Explicitly PUT-created directory markers stay explicit. - // Only auto-created parent directories are tagged as implicit. entry.Attributes.Mime = objectContentType // Set object owner for directory objects (same as regular objects)