aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-08-23 01:52:29 -0700
committerchrislu <chris.lu@gmail.com>2022-08-23 01:52:29 -0700
commitf0b4a7659a85d98121e4455b41e858fb6526a23f (patch)
tree76e25a8270fc07c8f861f0c2c18602f6c0a7d3f8
parentbf880060375a892f5bb8c9eadcc0ae12b97361f9 (diff)
downloadseaweedfs-f0b4a7659a85d98121e4455b41e858fb6526a23f.tar.xz
seaweedfs-f0b4a7659a85d98121e4455b41e858fb6526a23f.zip
fix test
-rw-r--r--weed/shell/commands.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/weed/shell/commands.go b/weed/shell/commands.go
index e703aad01..87aeed2bb 100644
--- a/weed/shell/commands.go
+++ b/weed/shell/commands.go
@@ -83,7 +83,10 @@ func (ce *CommandEnv) confirmIsLocked(args []string) error {
}
func (ce *CommandEnv) isLocked() bool {
- return ce != nil && ce.locker.IsLocked()
+ if ce == nil {
+ return true
+ }
+ return ce.locker.IsLocked()
}
func (ce *CommandEnv) checkDirectory(path string) error {