Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

fix filename not set error

Chris Lu47aea42d66c6
diff --git a/go/weed/volume.go b/go/weed/volume.go
index 87d42e2278..8bb1a0540e 100644
--- a/go/weed/volume.go
+++ b/go/weed/volume.go
@@ -165,7 +165,7 @@ func GetOrHeadHandler(w http.ResponseWriter, r *http.Request, isGetMethod bool)
}
}
if n.NameSize > 0 && filename == "" {
- filename := string(n.Name)
+ filename = string(n.Name)
dotIndex := strings.LastIndex(filename, ".")
if dotIndex > 0 {
ext = filename[dotIndex:]