aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/commands.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-08-22 14:11:13 -0700
committerchrislu <chris.lu@gmail.com>2022-08-22 14:11:13 -0700
commit57e7582c36544c15be2f3873d4fea4e6404dce29 (patch)
treefe28b522007957cfc73e7ee915cb2c4ea113e9d1 /weed/shell/commands.go
parent7ea2c24c5d0b6ea49093e9aa081aa704f78216fe (diff)
downloadseaweedfs-57e7582c36544c15be2f3873d4fea4e6404dce29.tar.xz
seaweedfs-57e7582c36544c15be2f3873d4fea4e6404dce29.zip
refactoring
Diffstat (limited to 'weed/shell/commands.go')
-rw-r--r--weed/shell/commands.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/weed/shell/commands.go b/weed/shell/commands.go
index e3de42aa9..15e6e06c2 100644
--- a/weed/shell/commands.go
+++ b/weed/shell/commands.go
@@ -73,7 +73,7 @@ func (ce *CommandEnv) isDirectory(path string) bool {
func (ce *CommandEnv) confirmIsLocked(args []string) error {
- if ce.locker.IsLocking() {
+ if ce.locker.IsLocked() {
return nil
}
ce.locker.SetMessage(fmt.Sprintf("%v", args))
@@ -82,6 +82,10 @@ func (ce *CommandEnv) confirmIsLocked(args []string) error {
}
+func (ce *CommandEnv) isLocked() bool {
+ return ce.locker.IsLocked()
+}
+
func (ce *CommandEnv) checkDirectory(path string) error {
dir, name := util.FullPath(path).DirAndName()