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: TestCommandEcBalanceSmall Unit test fails when CommandEnv is nil (#3497)

famosss911475526cc4
diff --git a/weed/shell/commands.go b/weed/shell/commands.go
index 15e6e06c2c..e703aad014 100644
--- a/weed/shell/commands.go
+++ b/weed/shell/commands.go
@@ -83,7 +83,7 @@ func (ce *CommandEnv) confirmIsLocked(args []string) error {
}
func (ce *CommandEnv) isLocked() bool {
- return ce.locker.IsLocked()
+ return ce != nil && ce.locker.IsLocked()
}
func (ce *CommandEnv) checkDirectory(path string) error {