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 bug when vid not found

chrislu31bb91583f15
diff --git a/weed/shell/command_ec_encode.go b/weed/shell/command_ec_encode.go
index a023686dc5..59bd0d8281 100644
--- a/weed/shell/command_ec_encode.go
+++ b/weed/shell/command_ec_encode.go
@@ -99,7 +99,7 @@ func doEcEncode(commandEnv *CommandEnv, collection string, vid needle.VolumeId,
// find volume location
locations, found := commandEnv.MasterClient.GetLocations(uint32(vid))
- if !found && len(locations) > 0 {
+ if !found {
return fmt.Errorf("volume %d not found", vid)
}