master: add cluster wide lock/unlock operation in weed shell
fix https://github.com/chrislusf/seaweedfs/issues/1286
This commit is contained in:
@@ -68,6 +68,16 @@ func (ce *CommandEnv) isDirectory(path string) bool {
|
||||
|
||||
}
|
||||
|
||||
func (ce *CommandEnv) confirmIsLocked() error {
|
||||
|
||||
if ce.locker.isLocking {
|
||||
return nil
|
||||
}
|
||||
|
||||
return fmt.Errorf("need to lock to continue")
|
||||
|
||||
}
|
||||
|
||||
func (ce *CommandEnv) checkDirectory(path string) error {
|
||||
|
||||
dir, name := util.FullPath(path).DirAndName()
|
||||
|
||||
Reference in New Issue
Block a user