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.

print error message if invalid file id is used

[email protected]cc8af2e7dc6d
diff --git a/weed-fs/src/cmd/weedc.go b/weed-fs/src/cmd/weedc.go
index 6b8800d23f..b2e9dda39c 100644
--- a/weed-fs/src/cmd/weedc.go
+++ b/weed-fs/src/cmd/weedc.go
@@ -45,6 +45,10 @@ func GetHandler(w http.ResponseWriter, r *http.Request) {
if dotIndex > 0 {
fid = path[commaIndex+1 : dotIndex]
}
+ if commaIndex <= 0 {
+ log.Println("unknown file id", path[sepIndex+1 : commaIndex])
+ return
+ }
volumeId, _ := strconv.Atoui64(path[sepIndex+1 : commaIndex])
n.ParsePath(fid)