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.

avoid non utf-8 in filename

Chris Lua37535cd9fe4
diff --git a/weed/util/fullpath.go b/weed/util/fullpath.go
index 4ce8a2f909..f2119707e4 100644
--- a/weed/util/fullpath.go
+++ b/weed/util/fullpath.go
@@ -13,6 +13,7 @@ func NewFullPath(dir, name string) FullPath {
func (fp FullPath) DirAndName() (string, string) {
dir, name := filepath.Split(string(fp))
+ name = strings.ToValidUTF8(name, "?")
if dir == "/" {
return dir, name
}
@@ -24,6 +25,7 @@ func (fp FullPath) DirAndName() (string, string) {
func (fp FullPath) Name() string {
_, name := filepath.Split(string(fp))
+ name = strings.ToValidUTF8(name, "?")
return name
}